From 7721aff7687016132282a229e4c8805dd1f7c775 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Thu, 11 Jun 2026 20:32:32 +0200 Subject: [PATCH 1/3] fix(ci): make the Nix build work with NES_ENABLE_MEOS=OFF and stock paho-mqtt-cpp The Nix environment provides paho-mqtt-cpp as a shared-only library and does not include libmeos. Four changes make the build pass: - flake.nix: add stock paho-mqtt-c + paho-mqtt-cpp to baseThirdPartyDeps; pass -DNES_ENABLE_MEOS=OFF in both defaultPackage and devShell cmakeFlags. - nes-plugins/CMakeLists.txt: introduce NES_ENABLE_MQTT and NES_ENABLE_MEOS options that gate the respective plugin subdirectories via activate_optional_plugin(). - nes-plugins/Sources/MQTTSource, nes-plugins/Sinks/MQTTSink: select PahoMqttCpp::paho-mqttpp3-static when available, fall back to the shared PahoMqttCpp::paho-mqttpp3 target (Nix only ships the shared variant). - nes-physical-operators: gate all MEOS-specific add_plugin calls and the nes-meos link behind if(NES_ENABLE_MEOS) in three CMakeLists files (top-level, Functions/Meos, Aggregation/Function/Meos). - CMakeLists.txt (root): declare option(NES_ENABLE_MEOS) and add_compile_definitions(NES_ENABLE_MEOS) before the nes-* subdirectory loop so the preprocessor symbol is visible to all sibling components. - nes-query-optimizer/LowerToPhysicalWindowedAggregation.cpp: guard the TemporalSequenceAggregationPhysicalFunction include and instantiation with #ifdef NES_ENABLE_MEOS so the translation unit compiles and links when MEOS is disabled. --- CMakeLists.txt | 7 +++ flake.nix | 4 ++ nes-physical-operators/CMakeLists.txt | 6 +- .../Aggregation/Function/Meos/CMakeLists.txt | 2 + .../src/Functions/Meos/CMakeLists.txt | 2 + nes-plugins/CMakeLists.txt | 55 ++++++++++--------- nes-plugins/Sinks/MQTTSink/CMakeLists.txt | 9 ++- nes-plugins/Sources/MQTTSource/CMakeLists.txt | 9 ++- .../LowerToPhysicalWindowedAggregation.cpp | 4 ++ 9 files changed, 67 insertions(+), 31 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dcaa97099..c67d32c34d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,6 +239,13 @@ endif () add_custom_target(build_all_plugins) +# Declared here so add_compile_definitions reaches all sibling nes-* targets. +# nes-plugins/CMakeLists.txt re-declares the same option (no-op when cached). +option(NES_ENABLE_MEOS "Enable MEOS plugin (requires libmeos installed on the system)" ON) +if(NES_ENABLE_MEOS) + add_compile_definitions(NES_ENABLE_MEOS) +endif() + # Add target for common lib, which contains a minimal set # of shared functionality used by all components of nes file(GLOB NES_DIRECTORIES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "nes-*") diff --git a/flake.nix b/flake.nix index 2d9788a4de..026e310022 100644 --- a/flake.nix +++ b/flake.nix @@ -54,6 +54,8 @@ tbb python3 openjdk21 + paho-mqtt-c + paho-mqtt-cpp ]) ++ [ follyPkg antlr4Pkg ]; antlr4Jar = pkgs.fetchurl { @@ -244,6 +246,7 @@ "-DNES_ENABLES_TESTS=ON" "-DCMAKE_MODULE_PATH=${libdwarfModule}/share/cmake/Modules" "-DANTLR4_JAR_LOCATION=${antlr4Jar}" + "-DNES_ENABLE_MEOS=OFF" ]; enableParallelBuilding = true; @@ -347,6 +350,7 @@ "-DLLVM_DIR=${commonCmakeEnv.LLVM_DIR}" "-DANTLR4_JAR_LOCATION=${antlr4Jar}" "-DCMAKE_MODULE_PATH=${libdwarfModule}/share/cmake/Modules" + "-DNES_ENABLE_MEOS=OFF" ]; shellHook = '' unset NES_PREBUILT_VCPKG_ROOT diff --git a/nes-physical-operators/CMakeLists.txt b/nes-physical-operators/CMakeLists.txt index c38afaf4db..b62a5922a9 100644 --- a/nes-physical-operators/CMakeLists.txt +++ b/nes-physical-operators/CMakeLists.txt @@ -19,7 +19,11 @@ get_source(nes-physical-operators NES_PHYSICAL_OPERATORS_SOURCE_FILES) # Add Library add_library(nes-physical-operators ${NES_PHYSICAL_OPERATORS_SOURCE_FILES}) -target_link_libraries(nes-physical-operators PUBLIC nes-sources nes-sinks nes-nautilus nes-meos) +if(NES_ENABLE_MEOS) + target_link_libraries(nes-physical-operators PUBLIC nes-sources nes-sinks nes-nautilus nes-meos) +else() + target_link_libraries(nes-physical-operators PUBLIC nes-sources nes-sinks nes-nautilus) +endif() target_include_directories(nes-physical-operators PUBLIC $ $) diff --git a/nes-physical-operators/src/Aggregation/Function/Meos/CMakeLists.txt b/nes-physical-operators/src/Aggregation/Function/Meos/CMakeLists.txt index c34e12f47e..0b107d5c2a 100644 --- a/nes-physical-operators/src/Aggregation/Function/Meos/CMakeLists.txt +++ b/nes-physical-operators/src/Aggregation/Function/Meos/CMakeLists.txt @@ -10,5 +10,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +if(NES_ENABLE_MEOS) add_plugin(TemporalSequence AggregationPhysicalFunction nes-physical-operators TemporalSequenceAggregationPhysicalFunction.cpp) add_plugin(Var AggregationPhysicalFunction nes-physical-operators VarAggregationFunction.cpp) +endif() diff --git a/nes-physical-operators/src/Functions/Meos/CMakeLists.txt b/nes-physical-operators/src/Functions/Meos/CMakeLists.txt index 516cdce4c3..cf83ac5aad 100644 --- a/nes-physical-operators/src/Functions/Meos/CMakeLists.txt +++ b/nes-physical-operators/src/Functions/Meos/CMakeLists.txt @@ -10,9 +10,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +if(NES_ENABLE_MEOS) add_plugin(TemporalIntersects PhysicalFunction nes-physical-operators TemporalIntersectsPhysicalFunction.cpp) add_plugin(TemporalIntersectsGeometry PhysicalFunction nes-physical-operators TemporalIntersectsGeometryPhysicalFunction.cpp) add_plugin(TemporalAIntersectsGeometry PhysicalFunction nes-physical-operators TemporalAIntersectsGeometryPhysicalFunction.cpp) add_plugin(TemporalEContainsGeometry PhysicalFunction nes-physical-operators TemporalEContainsGeometryPhysicalFunction.cpp) add_plugin(TemporalEDWithinGeometry PhysicalFunction nes-physical-operators TemporalEDWithinGeometryPhysicalFunction.cpp) add_plugin(TemporalAtStBox PhysicalFunction nes-physical-operators TemporalAtStBoxPhysicalFunction.cpp) +endif() diff --git a/nes-plugins/CMakeLists.txt b/nes-plugins/CMakeLists.txt index e666dd616e..3d33385853 100644 --- a/nes-plugins/CMakeLists.txt +++ b/nes-plugins/CMakeLists.txt @@ -20,33 +20,36 @@ activate_optional_plugin("Sources/TCPSource" ON) # Enable the Generator source plugin; required by systests and repl tests activate_optional_plugin("Sources/GeneratorSource" ON) activate_optional_plugin("Sinks/VoidSink" ON) -activate_optional_plugin("Sources/MQTTSource" ON) -activate_optional_plugin("Sinks/MQTTSink" ON) - -# MEOS is a dependency -activate_optional_plugin("MEOS" ON) -message(STATUS "Enable MEOS Plugin") - -# Detect the platform -if (APPLE) - message(STATUS "Building on macOS") - # Set the include and library directories for Homebrew (macOS) - set(MEOS_INCLUDE_DIR "/opt/homebrew/include" CACHE PATH "Path to MEOS include directory") - set(MEOS_PLUGIN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE PATH "Path to MEOS plugin include directory") - include_directories(SYSTEM ${MEOS_INCLUDE_DIR} ${MEOS_PLUGIN_INCLUDE_DIR}) - include_directories(SYSTEM ${MEOS_INCLUDE_DIR} ${MEOS_PLUGIN_INCLUDE_DIR}) - link_directories(${MEOS_LIBRARY_DIR} ) - -else() - message(STATUS "Building on Linux") - - # Default behavior for Linux - find_package(meos REQUIRED) - if(meos_FOUND) - message(STATUS "MEOS found: include=${meos_INCLUDE_DIR}, library=${meos}") - include_directories(SYSTEM ${meos_INCLUDE_DIR}) +option(NES_ENABLE_MQTT "Enable MQTT source and sink plugins (requires PahoMqttCpp)" ON) +activate_optional_plugin("Sources/MQTTSource" ${NES_ENABLE_MQTT}) +activate_optional_plugin("Sinks/MQTTSink" ${NES_ENABLE_MQTT}) + +option(NES_ENABLE_MEOS "Enable MEOS plugin (requires libmeos installed on the system)" ON) +activate_optional_plugin("MEOS" ${NES_ENABLE_MEOS}) +if (NES_ENABLE_MEOS) + message(STATUS "Enable MEOS Plugin") + + # Detect the platform + if (APPLE) + message(STATUS "Building on macOS") + # Set the include and library directories for Homebrew (macOS) + set(MEOS_INCLUDE_DIR "/opt/homebrew/include" CACHE PATH "Path to MEOS include directory") + set(MEOS_PLUGIN_INCLUDE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include" CACHE PATH "Path to MEOS plugin include directory") + include_directories(SYSTEM ${MEOS_INCLUDE_DIR} ${MEOS_PLUGIN_INCLUDE_DIR}) + include_directories(SYSTEM ${MEOS_INCLUDE_DIR} ${MEOS_PLUGIN_INCLUDE_DIR}) + link_directories(${MEOS_LIBRARY_DIR} ) + else() - message(FATAL_ERROR "MEOS library not found") + message(STATUS "Building on Linux") + + # Default behavior for Linux + find_package(meos REQUIRED) + if(meos_FOUND) + message(STATUS "MEOS found: include=${meos_INCLUDE_DIR}, library=${meos}") + include_directories(SYSTEM ${meos_INCLUDE_DIR}) + else() + message(FATAL_ERROR "MEOS library not found") + endif() endif() endif() diff --git a/nes-plugins/Sinks/MQTTSink/CMakeLists.txt b/nes-plugins/Sinks/MQTTSink/CMakeLists.txt index 4bf42deeab..80b3122e89 100644 --- a/nes-plugins/Sinks/MQTTSink/CMakeLists.txt +++ b/nes-plugins/Sinks/MQTTSink/CMakeLists.txt @@ -23,5 +23,10 @@ target_include_directories(mqtt_sink_validation_plugin_library ) find_package(PahoMqttCpp CONFIG REQUIRED) -target_link_libraries(mqtt_sink_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) -target_link_libraries(mqtt_sink_validation_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) +if(TARGET PahoMqttCpp::paho-mqttpp3-static) + target_link_libraries(mqtt_sink_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) + target_link_libraries(mqtt_sink_validation_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) +else() + target_link_libraries(mqtt_sink_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3) + target_link_libraries(mqtt_sink_validation_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3) +endif() diff --git a/nes-plugins/Sources/MQTTSource/CMakeLists.txt b/nes-plugins/Sources/MQTTSource/CMakeLists.txt index 9f9ed0dd17..27db6702a0 100644 --- a/nes-plugins/Sources/MQTTSource/CMakeLists.txt +++ b/nes-plugins/Sources/MQTTSource/CMakeLists.txt @@ -23,5 +23,10 @@ target_include_directories(mqtt_source_validation_plugin_library ) find_package(PahoMqttCpp CONFIG REQUIRED) -target_link_libraries(mqtt_source_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) -target_link_libraries(mqtt_source_validation_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) +if(TARGET PahoMqttCpp::paho-mqttpp3-static) + target_link_libraries(mqtt_source_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) + target_link_libraries(mqtt_source_validation_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3-static) +else() + target_link_libraries(mqtt_source_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3) + target_link_libraries(mqtt_source_validation_plugin_library PRIVATE PahoMqttCpp::paho-mqttpp3) +endif() diff --git a/nes-query-optimizer/src/RewriteRules/LowerToPhysical/LowerToPhysicalWindowedAggregation.cpp b/nes-query-optimizer/src/RewriteRules/LowerToPhysical/LowerToPhysicalWindowedAggregation.cpp index c994b91a9d..eb667c31ed 100644 --- a/nes-query-optimizer/src/RewriteRules/LowerToPhysical/LowerToPhysicalWindowedAggregation.cpp +++ b/nes-query-optimizer/src/RewriteRules/LowerToPhysical/LowerToPhysicalWindowedAggregation.cpp @@ -54,8 +54,10 @@ #include #include // Special-case lowering for TEMPORAL_SEQUENCE (multi-input) aggregation +#ifdef NES_ENABLE_MEOS #include #include +#endif namespace NES { @@ -128,6 +130,7 @@ getAggregationPhysicalFunctions(const WindowedAggregationLogicalOperator& logica const auto name = descriptor->getName(); // Custom lowering path for TEMPORAL_SEQUENCE: needs three field functions (lon, lat, ts) +#ifdef NES_ENABLE_MEOS if (name == std::string_view("TemporalSequence")) { auto tsDescriptor = std::dynamic_pointer_cast(descriptor); @@ -159,6 +162,7 @@ getAggregationPhysicalFunctions(const WindowedAggregationLogicalOperator& logica aggregationPhysicalFunctions.push_back(std::move(phys)); continue; } +#endif // Default path: use registry for single-input aggregations auto aggregationInputFunction = QueryCompilation::FunctionProvider::lowerFunction(descriptor->onField); From 60f6bf2d4cef79cb5876674813792e28ed7fa92a Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Thu, 2 Jul 2026 16:42:21 +0200 Subject: [PATCH 2/3] feat(codegen): per-event operator generator and drift guard The tools/codegen generator regenerates the full per-event MEOS operator surface from the committed IDL descriptors in one run, and the drift guard workflow asserts the committed operators equal the generator output on every pull request. --- .github/workflows/codegen-drift-guard.yml | 23 + tools/codegen/.gitignore | 2 + tools/codegen/codegen_aggregations.py | 2745 +++++ tools/codegen/codegen_nebula.py | 6658 +++++++++++ tools/codegen/gen_all.py | 64 + tools/codegen/missing-ops-descriptor.json | 9789 +++++++++++++++++ tools/codegen/numeric-descriptor.json | 927 ++ tools/codegen/phasec-composed-descriptor.json | 1953 ++++ tools/codegen/phasec-rest-descriptor.json | 3583 ++++++ .../spatial-phasec-full-descriptor.json | 2660 +++++ .../spatial-predicates-descriptor.json | 159 + .../codegen/tfloat-transforms-descriptor.json | 85 + tools/codegen/trgeo-descriptor.json | 311 + 13 files changed, 28959 insertions(+) create mode 100644 .github/workflows/codegen-drift-guard.yml create mode 100644 tools/codegen/.gitignore create mode 100644 tools/codegen/codegen_aggregations.py create mode 100644 tools/codegen/codegen_nebula.py create mode 100644 tools/codegen/gen_all.py create mode 100644 tools/codegen/missing-ops-descriptor.json create mode 100644 tools/codegen/numeric-descriptor.json create mode 100644 tools/codegen/phasec-composed-descriptor.json create mode 100644 tools/codegen/phasec-rest-descriptor.json create mode 100644 tools/codegen/spatial-phasec-full-descriptor.json create mode 100644 tools/codegen/spatial-predicates-descriptor.json create mode 100644 tools/codegen/tfloat-transforms-descriptor.json create mode 100644 tools/codegen/trgeo-descriptor.json diff --git a/.github/workflows/codegen-drift-guard.yml b/.github/workflows/codegen-drift-guard.yml new file mode 100644 index 0000000000..24f36b03f2 --- /dev/null +++ b/.github/workflows/codegen-drift-guard.yml @@ -0,0 +1,23 @@ +name: Codegen Drift Guard + +on: + pull_request: + +jobs: + codegen-drift-guard: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.12' + - name: Regenerate the per-event operator surface from the committed descriptors + run: python tools/codegen/gen_all.py --output-root . + - name: Assert the committed operators equal the generator output + run: | + if ! git diff --quiet; then + echo "::error::The MEOS operator surface drifted from the generator output." + echo "Regenerate with: python tools/codegen/gen_all.py --output-root ." + git diff --stat + exit 1 + fi diff --git a/tools/codegen/.gitignore b/tools/codegen/.gitignore new file mode 100644 index 0000000000..7a60b85e14 --- /dev/null +++ b/tools/codegen/.gitignore @@ -0,0 +1,2 @@ +__pycache__/ +*.pyc diff --git a/tools/codegen/codegen_aggregations.py b/tools/codegen/codegen_aggregations.py new file mode 100644 index 0000000000..e2b1e86bb8 --- /dev/null +++ b/tools/codegen/codegen_aggregations.py @@ -0,0 +1,2745 @@ +#!/usr/bin/env python3 +"""MobilityNebula MEOS-aggregation generator. + +Companion to ``codegen_nebula.py`` (per-event ops). This generator targets +the WINDOWED-aggregation surface: MEOS scalar functions of the shape +`` fn(const Temporal*)`` where the Temporal* is a per-(window, +group) sequence assembled across multiple events. + +For each operator in the JSON descriptor list, emits four C++ files +mirroring mariana's hand-written TemporalLengthAggregation 1:1: + + * nes-logical-operators/include/Operators/Windows/Aggregations/Meos/ + XXXAggregationLogicalFunction.hpp + * nes-logical-operators/src/Operators/Windows/Aggregations/Meos/ + XXXAggregationLogicalFunction.cpp + * nes-physical-operators/include/Aggregation/Function/Meos/ + XXXAggregationPhysicalFunction.hpp + * nes-physical-operators/src/Aggregation/Function/Meos/ + XXXAggregationPhysicalFunction.cpp + +And idempotently injects into 5 in-tree shared files: + + * nes-sql-parser/AntlrSQL.g4 + - lexer-token entries + - functionName: alternation list + * nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp + - case AntlrSQLLexer::TOKEN: dispatch in the dedicated-token switch + - else if (funcName == "TOKEN") dispatch in the IDENTIFIER fallback chain + * nes-query-optimizer/src/RewriteRules/LowerToPhysical/ + LowerToPhysicalWindowedAggregation.cpp + - if (name == "Xxx") { ... } block lowering logical → physical + * nes-{logical,physical}-operators/.../{Aggregation*}/CMakeLists.txt + - add_plugin(...) per layer + +All injections are bracketed with +``/* BEGIN CODEGEN AGGREGATION GLUE: TOKEN */ ... /* END ... */`` markers +so re-runs are no-ops and pre-existing hand-written cases (mariana's) are +detected by raw token match and skipped. + +Two lift-shape branches, picked by descriptor ``input_shape``: + * ``tgeo`` — 3 fields per event (lon, lat, ts); lower builds + ``{Point(lon lat)@ts, ...}`` trajectory string parsed via + ``MEOS::Meos::parseTemporalPoint``. + * ``tnumber``— 2 fields per event (value, ts); lower builds + ``{value@ts, ...}`` string parsed via ``tfloat_in`` or + ``tint_in`` per descriptor. + +Usage: + python3 codegen_aggregations.py --input \\ + --output-root /path/to/MobilityNebula \\ + [--no-parser-glue] [--no-cmake-entries] [--no-optimizer-glue] +""" +import argparse +import json +import re +import sys +from pathlib import Path + +# =========================================================================== +# Logical-layer .hpp template (mirrors TemporalLengthAggregationLogicalFunction.hpp). +# =========================================================================== +LOGICAL_HPP_TGEO = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include + +namespace NES +{{ + +/** + * @brief {comment_one_liner} + * + * Three-input (lon, lat, ts) tgeo aggregation. Lift accumulates the events + * into a paged vector; lower assembles the per-(window, group) trajectory + * and calls MEOS `{meos_scalar_fn}` to fold it to a single scalar. + */ +class {nebula_name}AggregationLogicalFunction : public WindowAggregationLogicalFunction +{{ +public: + static std::shared_ptr + create(const FieldAccessLogicalFunction& lonField, const FieldAccessLogicalFunction& latField, const FieldAccessLogicalFunction& timestampField); + + {nebula_name}AggregationLogicalFunction( + const FieldAccessLogicalFunction& lonField, + const FieldAccessLogicalFunction& latField, + const FieldAccessLogicalFunction& timestampField, + const FieldAccessLogicalFunction& asField); + + void inferStamp(const Schema& schema) override; + ~{nebula_name}AggregationLogicalFunction() override = default; + [[nodiscard]] NES::SerializableAggregationFunction serialize() const override; + [[nodiscard]] std::string_view getName() const noexcept override; + [[nodiscard]] bool requiresSequentialAggregation() const {{ return true; }} + + [[nodiscard]] const FieldAccessLogicalFunction& getLonField() const noexcept {{ return lonField; }} + [[nodiscard]] const FieldAccessLogicalFunction& getLatField() const noexcept {{ return latField; }} + [[nodiscard]] const FieldAccessLogicalFunction& getTimestampField() const noexcept {{ return timestampField; }} + +private: + static constexpr std::string_view NAME = "{class_name_token}"; + static constexpr DataType::Type partialAggregateStampType = DataType::Type::UNDEFINED; + static constexpr DataType::Type finalAggregateStampType = DataType::Type::{final_stamp_type}; + + FieldAccessLogicalFunction lonField; + FieldAccessLogicalFunction latField; + FieldAccessLogicalFunction timestampField; +}}; +}} +""" + +LOGICAL_HPP_TNUMBER = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include + +namespace NES +{{ + +/** + * @brief {comment_one_liner} + * + * Two-input (value, ts) tnumber aggregation. Lift accumulates the events + * into a paged vector; lower assembles the per-(window, group) tnumber + * sequence and calls MEOS `{meos_scalar_fn}` to fold it to a single scalar. + */ +class {nebula_name}AggregationLogicalFunction : public WindowAggregationLogicalFunction +{{ +public: + static std::shared_ptr + create(const FieldAccessLogicalFunction& valueField, const FieldAccessLogicalFunction& timestampField); + + {nebula_name}AggregationLogicalFunction( + const FieldAccessLogicalFunction& valueField, + const FieldAccessLogicalFunction& timestampField, + const FieldAccessLogicalFunction& asField); + + void inferStamp(const Schema& schema) override; + ~{nebula_name}AggregationLogicalFunction() override = default; + [[nodiscard]] NES::SerializableAggregationFunction serialize() const override; + [[nodiscard]] std::string_view getName() const noexcept override; + [[nodiscard]] bool requiresSequentialAggregation() const {{ return true; }} + + [[nodiscard]] const FieldAccessLogicalFunction& getValueField() const noexcept {{ return valueField; }} + [[nodiscard]] const FieldAccessLogicalFunction& getTimestampField() const noexcept {{ return timestampField; }} + +private: + static constexpr std::string_view NAME = "{class_name_token}"; + static constexpr DataType::Type partialAggregateStampType = DataType::Type::UNDEFINED; + static constexpr DataType::Type finalAggregateStampType = DataType::Type::{final_stamp_type}; + + FieldAccessLogicalFunction valueField; + FieldAccessLogicalFunction timestampField; +}}; +}} +""" + +# Logical .cpp templates — share scaffold (ctor, inferStamp, serialize, registry) +# but differ in field count (3 for tgeo, 2 for tnumber). +LOGICAL_CPP_TGEO = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace NES +{{ + +{nebula_name}AggregationLogicalFunction::{nebula_name}AggregationLogicalFunction( + const FieldAccessLogicalFunction& lonField, + const FieldAccessLogicalFunction& latField, + const FieldAccessLogicalFunction& timestampField, + const FieldAccessLogicalFunction& asField) + : WindowAggregationLogicalFunction( + lonField.getDataType(), + DataTypeProvider::provideDataType(partialAggregateStampType), + DataTypeProvider::provideDataType(finalAggregateStampType), + lonField, + asField) + , lonField(lonField) + , latField(latField) + , timestampField(timestampField) +{{ +}} + +std::shared_ptr +{nebula_name}AggregationLogicalFunction::create( + const FieldAccessLogicalFunction& lonField, + const FieldAccessLogicalFunction& latField, + const FieldAccessLogicalFunction& timestampField) +{{ + return std::make_shared<{nebula_name}AggregationLogicalFunction>(lonField, latField, timestampField, lonField); +}} + +std::string_view {nebula_name}AggregationLogicalFunction::getName() const noexcept +{{ + return NAME; +}} + +void {nebula_name}AggregationLogicalFunction::inferStamp(const Schema& schema) +{{ + lonField = lonField.withInferredDataType(schema).get(); + latField = latField.withInferredDataType(schema).get(); + timestampField = timestampField.withInferredDataType(schema).get(); + + onField = lonField; + + if (!lonField.getDataType().isNumeric() || !latField.getDataType().isNumeric() || !timestampField.getDataType().isNumeric()) + {{ + throw CannotInferSchema("{nebula_name}AggregationLogicalFunction: lon, lat, and timestamp fields must be numeric."); + }} + + const auto onFieldName = onField.getFieldName(); + const auto asFieldName = asField.getFieldName(); + const auto attributeNameResolver = onFieldName.substr(0, onFieldName.find(Schema::ATTRIBUTE_NAME_SEPARATOR) + 1); + if (asFieldName.find(Schema::ATTRIBUTE_NAME_SEPARATOR) == std::string::npos) + {{ + asField = asField.withFieldName(attributeNameResolver + asFieldName).get(); + }} + else + {{ + const auto fieldName = asFieldName.substr(asFieldName.find_last_of(Schema::ATTRIBUTE_NAME_SEPARATOR) + 1); + asField = asField.withFieldName(attributeNameResolver + fieldName).get(); + }} + asField = asField.withDataType(getFinalAggregateStamp()).get(); + inputStamp = onField.getDataType(); +}} + +NES::SerializableAggregationFunction {nebula_name}AggregationLogicalFunction::serialize() const +{{ + auto saf = TemporalAggregationSerde::serializeTemporalSequence(lonField, latField, timestampField, asField); + saf.set_type(std::string(NAME)); + return saf; +}} + +AggregationLogicalFunctionRegistryReturnType AggregationLogicalFunctionGeneratedRegistrar::Register{nebula_name}AggregationLogicalFunction( + AggregationLogicalFunctionRegistryArguments arguments) +{{ + if (arguments.fields.size() == 4) + {{ + auto ptr = std::make_shared<{nebula_name}AggregationLogicalFunction>( + arguments.fields[0], arguments.fields[1], arguments.fields[2], arguments.fields[3]); + return ptr; + }} + throw CannotDeserialize( + "{nebula_name}AggregationLogicalFunction requires lon, lat, timestamp, and alias fields but got {{}}", + arguments.fields.size()); +}} + +}} // namespace NES +""" + +LOGICAL_CPP_TNUMBER = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace NES +{{ + +{nebula_name}AggregationLogicalFunction::{nebula_name}AggregationLogicalFunction( + const FieldAccessLogicalFunction& valueField, + const FieldAccessLogicalFunction& timestampField, + const FieldAccessLogicalFunction& asField) + : WindowAggregationLogicalFunction( + valueField.getDataType(), + DataTypeProvider::provideDataType(partialAggregateStampType), + DataTypeProvider::provideDataType(finalAggregateStampType), + valueField, + asField) + , valueField(valueField) + , timestampField(timestampField) +{{ +}} + +std::shared_ptr +{nebula_name}AggregationLogicalFunction::create( + const FieldAccessLogicalFunction& valueField, + const FieldAccessLogicalFunction& timestampField) +{{ + return std::make_shared<{nebula_name}AggregationLogicalFunction>(valueField, timestampField, valueField); +}} + +std::string_view {nebula_name}AggregationLogicalFunction::getName() const noexcept +{{ + return NAME; +}} + +void {nebula_name}AggregationLogicalFunction::inferStamp(const Schema& schema) +{{ + valueField = valueField.withInferredDataType(schema).get(); + timestampField = timestampField.withInferredDataType(schema).get(); + + onField = valueField; + + if (!valueField.getDataType().isNumeric() || !timestampField.getDataType().isNumeric()) + {{ + throw CannotInferSchema("{nebula_name}AggregationLogicalFunction: value and timestamp fields must be numeric."); + }} + + const auto onFieldName = onField.getFieldName(); + const auto asFieldName = asField.getFieldName(); + const auto attributeNameResolver = onFieldName.substr(0, onFieldName.find(Schema::ATTRIBUTE_NAME_SEPARATOR) + 1); + if (asFieldName.find(Schema::ATTRIBUTE_NAME_SEPARATOR) == std::string::npos) + {{ + asField = asField.withFieldName(attributeNameResolver + asFieldName).get(); + }} + else + {{ + const auto fieldName = asFieldName.substr(asFieldName.find_last_of(Schema::ATTRIBUTE_NAME_SEPARATOR) + 1); + asField = asField.withFieldName(attributeNameResolver + fieldName).get(); + }} + asField = asField.withDataType(getFinalAggregateStamp()).get(); + inputStamp = onField.getDataType(); +}} + +NES::SerializableAggregationFunction {nebula_name}AggregationLogicalFunction::serialize() const +{{ + auto saf = TemporalAggregationSerde::serializeTemporalSequence(valueField, timestampField, valueField, asField); + saf.set_type(std::string(NAME)); + return saf; +}} + +AggregationLogicalFunctionRegistryReturnType AggregationLogicalFunctionGeneratedRegistrar::Register{nebula_name}AggregationLogicalFunction( + AggregationLogicalFunctionRegistryArguments arguments) +{{ + // serializeTemporalSequence only has a 4-field (lon, lat, ts, as) form, so + // the two-field (value, ts) shape packs the value field twice; fields[2] is + // that duplicate and is ignored here — the alias is fields[3]. + if (arguments.fields.size() == 4) + {{ + auto ptr = std::make_shared<{nebula_name}AggregationLogicalFunction>( + arguments.fields[0], arguments.fields[1], arguments.fields[3]); + return ptr; + }} + throw CannotDeserialize( + "{nebula_name}AggregationLogicalFunction requires value, timestamp, and alias fields but got {{}}", + arguments.fields.size()); +}} + +}} // namespace NES +""" + +# Physical-layer .hpp templates. +PHYSICAL_HPP_TGEO = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace NES +{{ + +class {nebula_name}AggregationPhysicalFunction : public AggregationPhysicalFunction +{{ +public: + {nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction lonFunctionParam, + PhysicalFunction latFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef); + void lift( + const nautilus::val& aggregationState, + PipelineMemoryProvider& pipelineMemoryProvider, + const Nautilus::Record& record) + override; + void combine( + nautilus::val aggregationState1, + nautilus::val aggregationState2, + PipelineMemoryProvider& pipelineMemoryProvider) override; + Nautilus::Record lower(nautilus::val aggregationState, [[maybe_unused]] PipelineMemoryProvider& pipelineMemoryProvider) override; + void reset(nautilus::val aggregationState, PipelineMemoryProvider& pipelineMemoryProvider) override; + [[nodiscard]] size_t getSizeOfStateInBytes() const override; + ~{nebula_name}AggregationPhysicalFunction() override = default; + void cleanup(nautilus::val aggregationState) override; + +private: + std::shared_ptr bufferRef; + PhysicalFunction lonFunction; + PhysicalFunction latFunction; + PhysicalFunction timestampFunction; +}}; + +}} +""" + +PHYSICAL_HPP_TNUMBER = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include +#include +#include + +namespace NES +{{ + +class {nebula_name}AggregationPhysicalFunction : public AggregationPhysicalFunction +{{ +public: + {nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction valueFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef); + void lift( + const nautilus::val& aggregationState, + PipelineMemoryProvider& pipelineMemoryProvider, + const Nautilus::Record& record) + override; + void combine( + nautilus::val aggregationState1, + nautilus::val aggregationState2, + PipelineMemoryProvider& pipelineMemoryProvider) override; + Nautilus::Record lower(nautilus::val aggregationState, [[maybe_unused]] PipelineMemoryProvider& pipelineMemoryProvider) override; + void reset(nautilus::val aggregationState, PipelineMemoryProvider& pipelineMemoryProvider) override; + [[nodiscard]] size_t getSizeOfStateInBytes() const override; + ~{nebula_name}AggregationPhysicalFunction() override = default; + void cleanup(nautilus::val aggregationState) override; + +private: + std::shared_ptr bufferRef; + PhysicalFunction valueFunction; + PhysicalFunction timestampFunction; +}}; + +}} +""" + +# Physical .cpp templates — the core logic. lift/combine/reset/cleanup are identical +# scaffold; lower() is the per-op differential (builds trajectory string + MEOS call). +PHYSICAL_CPP_TGEO = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +extern "C" {{ +#include +#include +}} + +namespace NES +{{ + +constexpr static std::string_view LonFieldName = "lon"; +constexpr static std::string_view LatFieldName = "lat"; +constexpr static std::string_view TimestampFieldName = "timestamp"; + +static std::mutex {mutex_name}; + + +{nebula_name}AggregationPhysicalFunction::{nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction lonFunctionParam, + PhysicalFunction latFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef) + : AggregationPhysicalFunction(std::move(inputType), std::move(resultType), lonFunctionParam, std::move(resultFieldIdentifier)) + , bufferRef(std::move(bufferRef)) + , lonFunction(std::move(lonFunctionParam)) + , latFunction(std::move(latFunctionParam)) + , timestampFunction(std::move(timestampFunctionParam)) +{{ +}} + +void {nebula_name}AggregationPhysicalFunction::lift( + const nautilus::val& aggregationState, PipelineMemoryProvider& pipelineMemoryProvider, const Nautilus::Record& record) +{{ + const auto pagedVectorPtr = static_cast>(aggregationState); + + auto lonValue = lonFunction.execute(record, pipelineMemoryProvider.arena); + auto latValue = latFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + Record aggregateStateRecord({{ + {{std::string(LonFieldName), lonValue}}, + {{std::string(LatFieldName), latValue}}, + {{std::string(TimestampFieldName), timestampValue}} + }}); + + const Nautilus::Interface::PagedVectorRef pagedVectorRef(pagedVectorPtr, bufferRef); + pagedVectorRef.writeRecord(aggregateStateRecord, pipelineMemoryProvider.bufferProvider); +}} + +void {nebula_name}AggregationPhysicalFunction::combine( + const nautilus::val aggregationState1, + const nautilus::val aggregationState2, + PipelineMemoryProvider&) +{{ + const auto memArea1 = static_cast>(aggregationState1); + const auto memArea2 = static_cast>(aggregationState2); + + nautilus::invoke( + +[](Nautilus::Interface::PagedVector* vector1, const Nautilus::Interface::PagedVector* vector2) -> void + {{ vector1->copyFrom(*vector2); }}, + memArea1, + memArea2); +}} + +Nautilus::Record {nebula_name}AggregationPhysicalFunction::lower( + const nautilus::val aggregationState, [[maybe_unused]] PipelineMemoryProvider& pipelineMemoryProvider) +{{ + MEOS::Meos::ensureMeosInitialized(); + + const auto pagedVectorPtr = static_cast>(aggregationState); + const Nautilus::Interface::PagedVectorRef pagedVectorRef(pagedVectorPtr, bufferRef); + const auto allFieldNames = bufferRef->getMemoryLayout()->getSchema().getFieldNames(); + const auto numberOfEntries = invoke( + +[](const Nautilus::Interface::PagedVector* pagedVector) + {{ + return pagedVector->getTotalNumberOfEntries(); + }}, + pagedVectorPtr); + + if (numberOfEntries == nautilus::val(0)) {{ + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, nautilus::val<{return_cpp_type}>(0)); + return resultRecord; + }} + + auto trajectoryStr = nautilus::invoke( + +[](const Nautilus::Interface::PagedVector* pagedVector) -> char* + {{ + size_t bufferSize = pagedVector->getTotalNumberOfEntries() * 150 + 50; + char* buffer = (char*)malloc(bufferSize); + memset(buffer, 0, bufferSize); + strcpy(buffer, "{{"); + return buffer; + }}, + pagedVectorPtr); + + auto pointCounter = nautilus::val(0); + + const auto endIt = pagedVectorRef.end(allFieldNames); + for (auto candidateIt = pagedVectorRef.begin(allFieldNames); candidateIt != endIt; ++candidateIt) + {{ + const auto itemRecord = *candidateIt; + + const auto lonValue = itemRecord.read(std::string(LonFieldName)); + const auto latValue = itemRecord.read(std::string(LatFieldName)); + const auto timestampValue = itemRecord.read(std::string(TimestampFieldName)); + + auto lon = lonValue.cast>(); + auto lat = latValue.cast>(); + auto timestamp = timestampValue.cast>(); + + trajectoryStr = nautilus::invoke( + +[](char* buffer, double lonVal, double latVal, int64_t tsVal, int64_t counter) -> char* + {{ + if (counter > 0) {{ + strcat(buffer, ", "); + }} + + long long adjustedTime; + if (tsVal > 1000000000000LL) {{ + adjustedTime = tsVal / 1000; + }} else {{ + adjustedTime = tsVal; + }} + + std::string timestampString = MEOS::Meos::convertSecondsToTimestamp(adjustedTime); + const char* timestampStr = timestampString.c_str(); + + char pointStr[120]; + sprintf(pointStr, "Point(%.6f %.6f)@%s", lonVal, latVal, timestampStr); + strcat(buffer, pointStr); + return buffer; + }}, + trajectoryStr, + lon, + lat, + timestamp, + pointCounter); + + pointCounter = pointCounter + nautilus::val(1); + }} + + trajectoryStr = nautilus::invoke( + +[](char* buffer) -> char* + {{ + strcat(buffer, "}}"); + return buffer; + }}, + trajectoryStr); + + auto resultValue = nautilus::invoke( + +[](const char* trajStr) -> {return_cpp_type} + {{ + if (!trajStr || strlen(trajStr) == 0) {{ + free((void*)trajStr); + return ({return_cpp_type})0; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + std::string trajString(trajStr); + void* temp = MEOS::Meos::parseTemporalPoint(trajString); + if (!temp) {{ + free((void*)trajStr); + return ({return_cpp_type})0; + }} + + {value_compute} + + MEOS::Meos::freeTemporalObject(temp); + free((void*)trajStr); + return value; + }}, + trajectoryStr); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, resultValue); + return resultRecord; +}} + +void {nebula_name}AggregationPhysicalFunction::reset(const nautilus::val aggregationState, PipelineMemoryProvider&) +{{ + nautilus::invoke( + +[](AggregationState* pagedVectorMemArea) -> void + {{ + auto* pagedVector = reinterpret_cast(pagedVectorMemArea); + new (pagedVector) Nautilus::Interface::PagedVector(); + }}, + aggregationState); +}} + +size_t {nebula_name}AggregationPhysicalFunction::getSizeOfStateInBytes() const +{{ + return sizeof(Nautilus::Interface::PagedVector); +}} + +void {nebula_name}AggregationPhysicalFunction::cleanup(nautilus::val aggregationState) +{{ + nautilus::invoke( + +[](AggregationState* pagedVectorMemArea) -> void + {{ + auto* pagedVector = reinterpret_cast(pagedVectorMemArea); + pagedVector->~PagedVector(); + }}, + aggregationState); +}} + + +AggregationPhysicalFunctionRegistryReturnType AggregationPhysicalFunctionGeneratedRegistrar::Register{nebula_name}AggregationPhysicalFunction( + AggregationPhysicalFunctionRegistryArguments) +{{ + throw std::runtime_error("{class_name_token} aggregation cannot be created through the registry. " + "It requires three field functions (longitude, latitude, timestamp)"); +}} + +}} // namespace NES +""" + +PHYSICAL_CPP_TNUMBER = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +extern "C" {{ +#include +}} + +namespace NES +{{ + +constexpr static std::string_view ValueFieldName = "value"; +constexpr static std::string_view TimestampFieldName = "timestamp"; + +static std::mutex {mutex_name}; + + +{nebula_name}AggregationPhysicalFunction::{nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction valueFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef) + : AggregationPhysicalFunction(std::move(inputType), std::move(resultType), valueFunctionParam, std::move(resultFieldIdentifier)) + , bufferRef(std::move(bufferRef)) + , valueFunction(std::move(valueFunctionParam)) + , timestampFunction(std::move(timestampFunctionParam)) +{{ +}} + +void {nebula_name}AggregationPhysicalFunction::lift( + const nautilus::val& aggregationState, PipelineMemoryProvider& pipelineMemoryProvider, const Nautilus::Record& record) +{{ + const auto pagedVectorPtr = static_cast>(aggregationState); + + auto valueValue = valueFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + Record aggregateStateRecord({{ + {{std::string(ValueFieldName), valueValue}}, + {{std::string(TimestampFieldName), timestampValue}} + }}); + + const Nautilus::Interface::PagedVectorRef pagedVectorRef(pagedVectorPtr, bufferRef); + pagedVectorRef.writeRecord(aggregateStateRecord, pipelineMemoryProvider.bufferProvider); +}} + +void {nebula_name}AggregationPhysicalFunction::combine( + const nautilus::val aggregationState1, + const nautilus::val aggregationState2, + PipelineMemoryProvider&) +{{ + const auto memArea1 = static_cast>(aggregationState1); + const auto memArea2 = static_cast>(aggregationState2); + + nautilus::invoke( + +[](Nautilus::Interface::PagedVector* vector1, const Nautilus::Interface::PagedVector* vector2) -> void + {{ vector1->copyFrom(*vector2); }}, + memArea1, + memArea2); +}} + +Nautilus::Record {nebula_name}AggregationPhysicalFunction::lower( + const nautilus::val aggregationState, [[maybe_unused]] PipelineMemoryProvider& pipelineMemoryProvider) +{{ + MEOS::Meos::ensureMeosInitialized(); + + const auto pagedVectorPtr = static_cast>(aggregationState); + const Nautilus::Interface::PagedVectorRef pagedVectorRef(pagedVectorPtr, bufferRef); + const auto allFieldNames = bufferRef->getMemoryLayout()->getSchema().getFieldNames(); + const auto numberOfEntries = invoke( + +[](const Nautilus::Interface::PagedVector* pagedVector) + {{ + return pagedVector->getTotalNumberOfEntries(); + }}, + pagedVectorPtr); + + if (numberOfEntries == nautilus::val(0)) {{ + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, nautilus::val<{return_cpp_type}>(0)); + return resultRecord; + }} + + auto sequenceStr = nautilus::invoke( + +[](const Nautilus::Interface::PagedVector* pagedVector) -> char* + {{ + size_t bufferSize = pagedVector->getTotalNumberOfEntries() * 80 + 50; + char* buffer = (char*)malloc(bufferSize); + memset(buffer, 0, bufferSize); + strcpy(buffer, "{{"); + return buffer; + }}, + pagedVectorPtr); + + auto pointCounter = nautilus::val(0); + + const auto endIt = pagedVectorRef.end(allFieldNames); + for (auto candidateIt = pagedVectorRef.begin(allFieldNames); candidateIt != endIt; ++candidateIt) + {{ + const auto itemRecord = *candidateIt; + + const auto valueRaw = itemRecord.read(std::string(ValueFieldName)); + const auto timestampRaw = itemRecord.read(std::string(TimestampFieldName)); + + auto value = valueRaw.cast>(); + auto timestamp = timestampRaw.cast>(); + + sequenceStr = nautilus::invoke( + +[](char* buffer, {lift_value_cpp_type} valueVal, int64_t tsVal, int64_t counter) -> char* + {{ + if (counter > 0) {{ + strcat(buffer, ", "); + }} + + long long adjustedTime; + if (tsVal > 1000000000000LL) {{ + adjustedTime = tsVal / 1000; + }} else {{ + adjustedTime = tsVal; + }} + + std::string timestampString = MEOS::Meos::convertSecondsToTimestamp(adjustedTime); + const char* timestampStr = timestampString.c_str(); + + char itemStr[80]; + sprintf(itemStr, "{value_printf_fmt}@%s", valueVal, timestampStr); + strcat(buffer, itemStr); + return buffer; + }}, + sequenceStr, + value, + timestamp, + pointCounter); + + pointCounter = pointCounter + nautilus::val(1); + }} + + sequenceStr = nautilus::invoke( + +[](char* buffer) -> char* + {{ + strcat(buffer, "}}"); + return buffer; + }}, + sequenceStr); + + auto resultValue = nautilus::invoke( + +[](const char* seqStr) -> {return_cpp_type} + {{ + if (!seqStr || strlen(seqStr) == 0) {{ + free((void*)seqStr); + return ({return_cpp_type})0; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + Temporal* temp = {tnumber_in_fn}(seqStr); + if (!temp) {{ + free((void*)seqStr); + return ({return_cpp_type})0; + }} + + {return_cpp_type} value = {meos_scalar_fn}(temp); + + free(temp); + free((void*)seqStr); + return value; + }}, + sequenceStr); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, resultValue); + return resultRecord; +}} + +void {nebula_name}AggregationPhysicalFunction::reset(const nautilus::val aggregationState, PipelineMemoryProvider&) +{{ + nautilus::invoke( + +[](AggregationState* pagedVectorMemArea) -> void + {{ + auto* pagedVector = reinterpret_cast(pagedVectorMemArea); + new (pagedVector) Nautilus::Interface::PagedVector(); + }}, + aggregationState); +}} + +size_t {nebula_name}AggregationPhysicalFunction::getSizeOfStateInBytes() const +{{ + return sizeof(Nautilus::Interface::PagedVector); +}} + +void {nebula_name}AggregationPhysicalFunction::cleanup(nautilus::val aggregationState) +{{ + nautilus::invoke( + +[](AggregationState* pagedVectorMemArea) -> void + {{ + auto* pagedVector = reinterpret_cast(pagedVectorMemArea); + pagedVector->~PagedVector(); + }}, + aggregationState); +}} + + +AggregationPhysicalFunctionRegistryReturnType AggregationPhysicalFunctionGeneratedRegistrar::Register{nebula_name}AggregationPhysicalFunction( + AggregationPhysicalFunctionRegistryArguments) +{{ + throw std::runtime_error("{class_name_token} aggregation cannot be created through the registry. " + "It requires two field functions (value, timestamp)"); +}} + +}} // namespace NES +""" + +# =========================================================================== +# Box-output (VARSIZED) physical .cpp templates. +# +# The 11 MEOS `*_extent_transfn` aggregates do not fold a window to a scalar — +# they fold it to a *box* (a Span / TBox / STBox). NebulaStream emits such a +# windowed value through the same variable-sized-data path that +# TemporalSequenceAggregationPhysicalFunction already uses: in lower() we +# serialize the box to text (`*_out`) and write it as VARSIZED. +# +# To stay byte-identical to the proven scalar templates above (lift / combine / +# reset / cleanup / the trajectory-assembly loop are unchanged), the box +# templates are DERIVED from the scalar templates by swapping exactly two +# well-delimited regions: the empty-window early-return and the finalize tail. +# The swap is asserted (count == 1) so any drift in the scalar template fails +# loudly at import time rather than emitting silently-wrong C++. +# =========================================================================== + +# Empty-window early-return — identical in the TGEO and TNUMBER scalar templates. +_EMPTY_SCALAR = """\ + if (numberOfEntries == nautilus::val(0)) {{ + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, nautilus::val<{return_cpp_type}>(0)); + return resultRecord; + }}""" + +_EMPTY_BOX = """\ + if (numberOfEntries == nautilus::val(0)) {{ + auto emptyVarSized = pipelineMemoryProvider.arena.allocateVariableSizedData(0); + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, emptyVarSized); + return resultRecord; + }}""" + +# Finalize tail — TGEO scalar (parseTemporalPoint / trajectoryStr / freeTemporalObject). +_FINALIZE_SCALAR_TGEO = """\ + auto resultValue = nautilus::invoke( + +[](const char* trajStr) -> {return_cpp_type} + {{ + if (!trajStr || strlen(trajStr) == 0) {{ + free((void*)trajStr); + return ({return_cpp_type})0; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + std::string trajString(trajStr); + void* temp = MEOS::Meos::parseTemporalPoint(trajString); + if (!temp) {{ + free((void*)trajStr); + return ({return_cpp_type})0; + }} + + {value_compute} + + MEOS::Meos::freeTemporalObject(temp); + free((void*)trajStr); + return value; + }}, + trajectoryStr); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, resultValue); + return resultRecord;""" + +# Finalize tail — TGEO box: fold the windowed trajectory's extent box and emit +# its serialized text as VARSIZED. With a NULL initial state the MEOS extent +# transition fn returns the bbox of the whole-window temporal (e.g. +# tspatial_extent_transfn(NULL, traj) == tspatial_to_stbox(traj)). +_FINALIZE_BOX_TGEO = """\ + auto boxStr = nautilus::invoke( + +[](const char* trajStr) -> char* + {{ + if (!trajStr || strlen(trajStr) == 0) {{ + free((void*)trajStr); + return (char*)nullptr; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + std::string trajString(trajStr); + void* temp = MEOS::Meos::parseTemporalPoint(trajString); + free((void*)trajStr); + if (!temp) {{ + return (char*)nullptr; + }} + + {extent_box_type}* aggBox = {extent_transfn}(nullptr, static_cast(temp)); + MEOS::Meos::freeTemporalObject(temp); + if (!aggBox) {{ + return (char*)nullptr; + }} + + char* boxText = {box_out_fn}(aggBox, 15); + free(aggBox); + return boxText; + }}, + trajectoryStr); + + const auto boxStrLen = nautilus::invoke( + +[](const char* s) -> size_t {{ return s ? strlen(s) : (size_t) 0; }}, + boxStr); + + auto variableSized = pipelineMemoryProvider.arena.allocateVariableSizedData(boxStrLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, size_t len) -> void + {{ + if (s) {{ + memcpy(dest, s, len); + free((void*)s); + }} + }}, + variableSized.getContent(), + boxStr, + boxStrLen); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, variableSized); + return resultRecord;""" + +# Finalize tail — TNUMBER scalar ({tnumber_in_fn} / sequenceStr / free(temp)). +_FINALIZE_SCALAR_TNUMBER = """\ + auto resultValue = nautilus::invoke( + +[](const char* seqStr) -> {return_cpp_type} + {{ + if (!seqStr || strlen(seqStr) == 0) {{ + free((void*)seqStr); + return ({return_cpp_type})0; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + Temporal* temp = {tnumber_in_fn}(seqStr); + if (!temp) {{ + free((void*)seqStr); + return ({return_cpp_type})0; + }} + + {return_cpp_type} value = {meos_scalar_fn}(temp); + + free(temp); + free((void*)seqStr); + return value; + }}, + sequenceStr); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, resultValue); + return resultRecord;""" + +# Finalize tail — TNUMBER box. +_FINALIZE_BOX_TNUMBER = """\ + auto boxStr = nautilus::invoke( + +[](const char* seqStr) -> char* + {{ + if (!seqStr || strlen(seqStr) == 0) {{ + free((void*)seqStr); + return (char*)nullptr; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + Temporal* temp = {tnumber_in_fn}(seqStr); + free((void*)seqStr); + if (!temp) {{ + return (char*)nullptr; + }} + + {extent_box_type}* aggBox = {extent_transfn}(nullptr, temp); + free(temp); + if (!aggBox) {{ + return (char*)nullptr; + }} + + char* boxText = {box_out_fn}(aggBox, 15); + free(aggBox); + return boxText; + }}, + sequenceStr); + + const auto boxStrLen = nautilus::invoke( + +[](const char* s) -> size_t {{ return s ? strlen(s) : (size_t) 0; }}, + boxStr); + + auto variableSized = pipelineMemoryProvider.arena.allocateVariableSizedData(boxStrLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, size_t len) -> void + {{ + if (s) {{ + memcpy(dest, s, len); + free((void*)s); + }} + }}, + variableSized.getContent(), + boxStr, + boxStrLen); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, variableSized); + return resultRecord;""" + + +def _swap_once(template, old, new, what): + """Replace exactly one occurrence of `old` with `new`, asserting the count + so a drifted scalar template fails at import rather than emitting bad C++.""" + n = template.count(old) + if n != 1: + raise AssertionError( + f"box-template derivation: expected exactly 1 occurrence of {what}, found {n}") + return template.replace(old, new) + + +PHYSICAL_CPP_TGEO_BOX = _swap_once( + _swap_once(PHYSICAL_CPP_TGEO, _EMPTY_SCALAR, _EMPTY_BOX, "tgeo empty-window block"), + _FINALIZE_SCALAR_TGEO, _FINALIZE_BOX_TGEO, "tgeo finalize tail") + +PHYSICAL_CPP_TNUMBER_BOX = _swap_once( + _swap_once(PHYSICAL_CPP_TNUMBER, _EMPTY_SCALAR, _EMPTY_BOX, "tnumber empty-window block"), + _FINALIZE_SCALAR_TNUMBER, _FINALIZE_BOX_TNUMBER, "tnumber finalize tail") + +# =========================================================================== +# WKB-trajectory output (return_mode "wkb"): materialize the windowed mini-trip +# as a SEQUENCE ([ ... ], linear interpolation — so trajectory functions like +# length are meaningful) and emit its hex-WKB. This is the value the MEOS +# function library composes over (the efficient materialize-once mechanism). +# Derived from the tgeo scalar template by swapping the empty-window write, the +# instant-set braces for sequence brackets, and the finalize. +# =========================================================================== +_FINALIZE_WKB_TGEO = """\ + auto boxStr = nautilus::invoke( + +[](const char* trajStr) -> char* + {{ + if (!trajStr || strlen(trajStr) == 0) {{ + free((void*)trajStr); + return (char*)nullptr; + }} + + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + + std::string trajString(trajStr); + void* temp = MEOS::Meos::parseTemporalPoint(trajString); + free((void*)trajStr); + if (!temp) {{ + return (char*)nullptr; + }} + + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(static_cast(temp), 0, &hexSize); + MEOS::Meos::freeTemporalObject(temp); + return hexOut; + }}, + trajectoryStr); + + const auto boxStrLen = nautilus::invoke( + +[](const char* s) -> size_t {{ return s ? strlen(s) : (size_t) 0; }}, + boxStr); + + auto variableSized = pipelineMemoryProvider.arena.allocateVariableSizedData(boxStrLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, size_t len) -> void + {{ + if (s) {{ + memcpy(dest, s, len); + free((void*)s); + }} + }}, + variableSized.getContent(), + boxStr, + boxStrLen); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, variableSized); + return resultRecord;""" + +PHYSICAL_CPP_TGEO_WKB = _swap_once( + _swap_once( + _swap_once( + _swap_once(PHYSICAL_CPP_TGEO, _EMPTY_SCALAR, _EMPTY_BOX, "tgeo-wkb empty-window block"), + ' strcpy(buffer, "{{");', ' strcpy(buffer, "[");', "tgeo-wkb open bracket -> sequence"), + ' strcat(buffer, "}}");', ' strcat(buffer, "]");', "tgeo-wkb close bracket -> sequence"), + _FINALIZE_SCALAR_TGEO, _FINALIZE_WKB_TGEO, "tgeo-wkb finalize tail") + +# =========================================================================== +# Expandable-Temporal* aggregate (return_mode "expand"): the MEOS-native +# streaming model — the aggregate STATE is a live expandable `Temporal*` (a +# mini-trip trajectory), grown in place per event via the public streaming +# primitive `temporal_append_tinstant(..., expand=true)` (amortized-O(1), +# doubling). lower() applies the invariant MEOS scalar fn DIRECTLY to the live +# trajectory — no per-event string build, no parse-the-whole-window, no WKB. +# State is a `Temporal*` slot (sizeof(Temporal*)); public funcs only +# (tgeompoint_in / tsequence_make / temporal_append_tinstant / temporal_merge). +# =========================================================================== +PHYSICAL_CPP_TGEO_EXPAND = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +extern "C" {{ +#include +#include +}} + +namespace NES +{{ + +static std::mutex {mutex_name}; + + +{nebula_name}AggregationPhysicalFunction::{nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction lonFunctionParam, + PhysicalFunction latFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef) + : AggregationPhysicalFunction(std::move(inputType), std::move(resultType), lonFunctionParam, std::move(resultFieldIdentifier)) + , bufferRef(std::move(bufferRef)) + , lonFunction(std::move(lonFunctionParam)) + , latFunction(std::move(latFunctionParam)) + , timestampFunction(std::move(timestampFunctionParam)) +{{ +}} + +void {nebula_name}AggregationPhysicalFunction::lift( + const nautilus::val& aggregationState, PipelineMemoryProvider& pipelineMemoryProvider, const Nautilus::Record& record) +{{ + auto lonValue = lonFunction.execute(record, pipelineMemoryProvider.arena); + auto latValue = latFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + auto lon = lonValue.cast>(); + auto lat = latValue.cast>(); + auto timestamp = timestampValue.cast>(); + + nautilus::invoke( + +[](AggregationState* st, double lonVal, double latVal, int64_t tsVal) -> void + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + + long long sec = (tsVal > 1000000000000LL) ? (tsVal / 1000) : tsVal; + std::string ts = MEOS::Meos::convertSecondsToTimestamp(sec); + char wkt[120]; + snprintf(wkt, sizeof(wkt), "SRID=4326;Point(%.6f %.6f)@%s", lonVal, latVal, ts.c_str()); + + // Public instant constructor: a single-instant tgeompoint Temporal. + Temporal* instTemp = tgeompoint_in(wkt); + if (!instTemp) {{ + return; + }} + if (*slot == nullptr) {{ + // First event: a 1-instant sequence; subsequent appendInstant calls + // grow it in place (expand=true doubles maxcount when full). + TInstant* arr[1]; + arr[0] = (TInstant*) instTemp; + *slot = (Temporal*) tsequence_make((TInstant**) arr, 1, true, true, LINEAR, false); + }} else {{ + *slot = temporal_append_tinstant(*slot, (const TInstant*) instTemp, LINEAR, 0.0, nullptr, true); + }} + free(instTemp); // copied by tsequence_make / temporal_append_tinstant + }}, + aggregationState, + lon, + lat, + timestamp); +}} + +void {nebula_name}AggregationPhysicalFunction::combine( + const nautilus::val aggregationState1, + const nautilus::val aggregationState2, + PipelineMemoryProvider&) +{{ + nautilus::invoke( + +[](AggregationState* st1, AggregationState* st2) -> void + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** s1 = reinterpret_cast(st1); + Temporal** s2 = reinterpret_cast(st2); + if (*s2 == nullptr) {{ + return; + }} + if (*s1 == nullptr) {{ + *s1 = *s2; + *s2 = nullptr; + return; + }} + // temporal_merge returns a fresh temporal (copies inputs, frees nothing). + Temporal* merged = temporal_merge(*s1, *s2); + free(*s1); + free(*s2); + *s2 = nullptr; + *s1 = merged; + }}, + aggregationState1, + aggregationState2); +}} + +Nautilus::Record {nebula_name}AggregationPhysicalFunction::lower( + const nautilus::val aggregationState, [[maybe_unused]] PipelineMemoryProvider& pipelineMemoryProvider) +{{ + MEOS::Meos::ensureMeosInitialized(); + + auto resultValue = nautilus::invoke( + +[](AggregationState* st) -> {return_cpp_type} + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + if (*slot == nullptr) {{ + return ({return_cpp_type})0; + }} + return {meos_scalar_fn}(*slot); + }}, + aggregationState); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, resultValue); + return resultRecord; +}} + +void {nebula_name}AggregationPhysicalFunction::reset(const nautilus::val aggregationState, PipelineMemoryProvider&) +{{ + nautilus::invoke( + +[](AggregationState* st) -> void + {{ + Temporal** slot = reinterpret_cast(st); + *slot = nullptr; + }}, + aggregationState); +}} + +size_t {nebula_name}AggregationPhysicalFunction::getSizeOfStateInBytes() const +{{ + return sizeof(Temporal*); +}} + +void {nebula_name}AggregationPhysicalFunction::cleanup(nautilus::val aggregationState) +{{ + nautilus::invoke( + +[](AggregationState* st) -> void + {{ + Temporal** slot = reinterpret_cast(st); + if (*slot != nullptr) {{ + free(*slot); + *slot = nullptr; + }} + }}, + aggregationState); +}} + + +AggregationPhysicalFunctionRegistryReturnType AggregationPhysicalFunctionGeneratedRegistrar::Register{nebula_name}AggregationPhysicalFunction( + AggregationPhysicalFunctionRegistryArguments) +{{ + throw std::runtime_error("{class_name_token} aggregation cannot be created through the registry. " + "It requires three field functions (longitude, latitude, timestamp)"); +}} + +}} // namespace NES +""" + +# =========================================================================== +# Scalar-fold box-output template (value/time Span extents). +# +# Reuses the tnumber (value, ts) HPP / ctor / lift / combine / reset / cleanup +# verbatim — only lower() differs. There is NO trajectory/sequence string and +# NO MEOS parse: the chosen scalar field is folded DIRECTLY through the MEOS +# extent transition fn (`float_extent_transfn`, `timestamptz_extent_transfn`, +# …), the Span state threading across events as an opaque pointer (NULL initial +# state -> first call allocates via span_make, later calls span_expand in place; +# one allocation total, freed after serialization via the external typed +# wrapper `floatspan_out` / `intspan_out` / `bigintspan_out` / `tstzspan_out`). +# =========================================================================== +PHYSICAL_CPP_SCALARFOLD = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include +extern "C" {{ +#include +}} + +namespace NES +{{ + +constexpr static std::string_view ValueFieldName = "value"; +constexpr static std::string_view TimestampFieldName = "timestamp"; + +static std::mutex {mutex_name}; + + +{nebula_name}AggregationPhysicalFunction::{nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction valueFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef) + : AggregationPhysicalFunction(std::move(inputType), std::move(resultType), valueFunctionParam, std::move(resultFieldIdentifier)) + , bufferRef(std::move(bufferRef)) + , valueFunction(std::move(valueFunctionParam)) + , timestampFunction(std::move(timestampFunctionParam)) +{{ +}} + +void {nebula_name}AggregationPhysicalFunction::lift( + const nautilus::val& aggregationState, PipelineMemoryProvider& pipelineMemoryProvider, const Nautilus::Record& record) +{{ + const auto pagedVectorPtr = static_cast>(aggregationState); + + auto valueValue = valueFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + Record aggregateStateRecord({{ + {{std::string(ValueFieldName), valueValue}}, + {{std::string(TimestampFieldName), timestampValue}} + }}); + + const Nautilus::Interface::PagedVectorRef pagedVectorRef(pagedVectorPtr, bufferRef); + pagedVectorRef.writeRecord(aggregateStateRecord, pipelineMemoryProvider.bufferProvider); +}} + +void {nebula_name}AggregationPhysicalFunction::combine( + const nautilus::val aggregationState1, + const nautilus::val aggregationState2, + PipelineMemoryProvider&) +{{ + const auto memArea1 = static_cast>(aggregationState1); + const auto memArea2 = static_cast>(aggregationState2); + + nautilus::invoke( + +[](Nautilus::Interface::PagedVector* vector1, const Nautilus::Interface::PagedVector* vector2) -> void + {{ vector1->copyFrom(*vector2); }}, + memArea1, + memArea2); +}} + +Nautilus::Record {nebula_name}AggregationPhysicalFunction::lower( + const nautilus::val aggregationState, [[maybe_unused]] PipelineMemoryProvider& pipelineMemoryProvider) +{{ + MEOS::Meos::ensureMeosInitialized(); + + const auto pagedVectorPtr = static_cast>(aggregationState); + const Nautilus::Interface::PagedVectorRef pagedVectorRef(pagedVectorPtr, bufferRef); + const auto allFieldNames = bufferRef->getMemoryLayout()->getSchema().getFieldNames(); + const auto numberOfEntries = invoke( + +[](const Nautilus::Interface::PagedVector* pagedVector) + {{ + return pagedVector->getTotalNumberOfEntries(); + }}, + pagedVectorPtr); + + if (numberOfEntries == nautilus::val(0)) {{ + auto emptyVarSized = pipelineMemoryProvider.arena.allocateVariableSizedData(0); + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, emptyVarSized); + return resultRecord; + }} + + // Fold the windowed scalar field through the MEOS extent transition fn. + // The Span state threads across events as an opaque pointer; a NULL initial + // state makes the first call allocate, later calls expand in place. + auto spanState = nautilus::invoke( + +[](const Nautilus::Interface::PagedVector*) -> void* {{ return nullptr; }}, + pagedVectorPtr); + + const auto endIt = pagedVectorRef.end(allFieldNames); + for (auto candidateIt = pagedVectorRef.begin(allFieldNames); candidateIt != endIt; ++candidateIt) + {{ + const auto itemRecord = *candidateIt; + const auto valueRaw = itemRecord.read(std::string(ValueFieldName)); + auto value = valueRaw.cast>(); + + spanState = nautilus::invoke( + +[](void* state, {fold_field_cpp_type} val) -> void* + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + {fold_invoke_body} + }}, + spanState, + value); + }} + + auto boxStr = nautilus::invoke( + +[](void* state) -> char* + {{ + if (!state) {{ + return (char*)nullptr; + }} + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Span* sp = static_cast(state); + char* out = {box_out_call}; + free(state); + return out; + }}, + spanState); + + const auto boxStrLen = nautilus::invoke( + +[](const char* s) -> size_t {{ return s ? strlen(s) : (size_t) 0; }}, + boxStr); + + auto variableSized = pipelineMemoryProvider.arena.allocateVariableSizedData(boxStrLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, size_t len) -> void + {{ + if (s) {{ + memcpy(dest, s, len); + free((void*)s); + }} + }}, + variableSized.getContent(), + boxStr, + boxStrLen); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, variableSized); + return resultRecord; +}} + +void {nebula_name}AggregationPhysicalFunction::reset(const nautilus::val aggregationState, PipelineMemoryProvider&) +{{ + nautilus::invoke( + +[](AggregationState* pagedVectorMemArea) -> void + {{ + auto* pagedVector = reinterpret_cast(pagedVectorMemArea); + new (pagedVector) Nautilus::Interface::PagedVector(); + }}, + aggregationState); +}} + +size_t {nebula_name}AggregationPhysicalFunction::getSizeOfStateInBytes() const +{{ + return sizeof(Nautilus::Interface::PagedVector); +}} + +void {nebula_name}AggregationPhysicalFunction::cleanup(nautilus::val aggregationState) +{{ + nautilus::invoke( + +[](AggregationState* pagedVectorMemArea) -> void + {{ + auto* pagedVector = reinterpret_cast(pagedVectorMemArea); + pagedVector->~PagedVector(); + }}, + aggregationState); +}} + + +AggregationPhysicalFunctionRegistryReturnType AggregationPhysicalFunctionGeneratedRegistrar::Register{nebula_name}AggregationPhysicalFunction( + AggregationPhysicalFunctionRegistryArguments) +{{ + throw std::runtime_error("{class_name_token} aggregation cannot be created through the registry. " + "It requires two field functions (value, timestamp)"); +}} + +}} // namespace NES +""" + +# =========================================================================== +# Set-collect aggregate template (windowed union -> Set). +# +# Same scalar-fold mechanism as PHYSICAL_CPP_SCALARFOLD, but the per-event +# `*_union_transfn` accumulates an unordered Set state (not a Span); the window +# is finalized with `set_union_finalfn` into the canonical Set before +# serialization through an external typed wrapper (floatset_out / intset_out / +# bigintset_out / tstzset_out). Derived from the scalar-fold template by an +# asserted swap of only the serialize lambda — the fold loop / lift / combine / +# reset / cleanup stay byte-identical. +# =========================================================================== +_SCALARFOLD_SERIALIZE_SPAN = """\ + auto boxStr = nautilus::invoke( + +[](void* state) -> char* + {{ + if (!state) {{ + return (char*)nullptr; + }} + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Span* sp = static_cast(state); + char* out = {box_out_call}; + free(state); + return out; + }}, + spanState);""" + +_SCALARFOLD_SERIALIZE_SET = """\ + auto boxStr = nautilus::invoke( + +[](void* state) -> char* + {{ + if (!state) {{ + return (char*)nullptr; + }} + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + // set_union_finalfn pfree()s the state internally and returns a new + // Set, so the state must NOT be freed again here (double free). + Set* sp = {finalfn}(static_cast(state)); + if (!sp) {{ + return (char*)nullptr; + }} + char* out = {box_out_call}; + free(sp); + return out; + }}, + spanState);""" + +PHYSICAL_CPP_SETFOLD = _swap_once( + PHYSICAL_CPP_SCALARFOLD, _SCALARFOLD_SERIALIZE_SPAN, _SCALARFOLD_SERIALIZE_SET, + "scalarfold serialize -> setfold (finalfn)") + +# =========================================================================== +# Parser-glue templates: TWO dispatch sites in AntlrSQLQueryPlanCreator.cpp. +# Site 1 is the dedicated-token case-switch (~line 965 in mariana's tree). +# Site 2 is the IDENTIFIER fallback `else if (funcName == "TOKEN")` chain +# (~line 2062 in mariana's tree). +# =========================================================================== + +# Site 1 — case-switch dispatch. Two shapes (tgeo 3-arg, tnumber 2-arg). +CASE_SWITCH_TGEO = """\ + /* BEGIN CODEGEN AGGREGATION GLUE: {sql_token} (case-switch) */ + case AntlrSQLLexer::{sql_token}: + // {comment_one_liner} + if (helpers.top().functionBuilder.size() != 3) {{ + throw InvalidQuerySyntax("{sql_token} requires exactly three arguments (longitude, latitude, timestamp), but got {{}}", helpers.top().functionBuilder.size()); + }} + {{ + const auto timestampFunction = helpers.top().functionBuilder.back(); + helpers.top().functionBuilder.pop_back(); + const auto latitudeFunction = helpers.top().functionBuilder.back(); + helpers.top().functionBuilder.pop_back(); + const auto longitudeFunction = helpers.top().functionBuilder.back(); + helpers.top().functionBuilder.pop_back(); + + if (!longitudeFunction.tryGet() || + !latitudeFunction.tryGet() || + !timestampFunction.tryGet()) {{ + throw InvalidQuerySyntax("{sql_token} arguments must be field references"); + }} + + helpers.top().windowAggs.push_back( + {nebula_name}AggregationLogicalFunction::create(longitudeFunction.get(), + latitudeFunction.get(), + timestampFunction.get())); + helpers.top().functionBuilder.push_back(longitudeFunction); + }} + break; + /* END CODEGEN AGGREGATION GLUE: {sql_token} (case-switch) */ +""" + +CASE_SWITCH_TNUMBER = """\ + /* BEGIN CODEGEN AGGREGATION GLUE: {sql_token} (case-switch) */ + case AntlrSQLLexer::{sql_token}: + // {comment_one_liner} + if (helpers.top().functionBuilder.size() != 2) {{ + throw InvalidQuerySyntax("{sql_token} requires exactly two arguments (value, timestamp), but got {{}}", helpers.top().functionBuilder.size()); + }} + {{ + const auto timestampFunction = helpers.top().functionBuilder.back(); + helpers.top().functionBuilder.pop_back(); + const auto valueFunction = helpers.top().functionBuilder.back(); + helpers.top().functionBuilder.pop_back(); + + if (!valueFunction.tryGet() || + !timestampFunction.tryGet()) {{ + throw InvalidQuerySyntax("{sql_token} arguments must be field references"); + }} + + helpers.top().windowAggs.push_back( + {nebula_name}AggregationLogicalFunction::create(valueFunction.get(), + timestampFunction.get())); + helpers.top().functionBuilder.push_back(valueFunction); + }} + break; + /* END CODEGEN AGGREGATION GLUE: {sql_token} (case-switch) */ +""" + +# Site 2 — funcName == "TOKEN" string chain. +FUNCNAME_CHAIN_TGEO = """\ + /* BEGIN CODEGEN AGGREGATION GLUE: {sql_token} (funcName chain) */ + else if (funcName == "{sql_token}") + {{ + if (helpers.top().functionBuilder.size() < 3) + {{ + throw InvalidQuerySyntax("{sql_token} requires three arguments at {{}}", context->getText()); + }} + const auto ts = helpers.top().functionBuilder.back().get(); + helpers.top().functionBuilder.pop_back(); + const auto lat = helpers.top().functionBuilder.back().get(); + helpers.top().functionBuilder.pop_back(); + const auto lon = helpers.top().functionBuilder.back().get(); + helpers.top().functionBuilder.pop_back(); + helpers.top().windowAggs.push_back({nebula_name}AggregationLogicalFunction::create(lon, lat, ts)); + }} + /* END CODEGEN AGGREGATION GLUE: {sql_token} (funcName chain) */ +""" + +FUNCNAME_CHAIN_TNUMBER = """\ + /* BEGIN CODEGEN AGGREGATION GLUE: {sql_token} (funcName chain) */ + else if (funcName == "{sql_token}") + {{ + if (helpers.top().functionBuilder.size() < 2) + {{ + throw InvalidQuerySyntax("{sql_token} requires two arguments at {{}}", context->getText()); + }} + const auto ts = helpers.top().functionBuilder.back().get(); + helpers.top().functionBuilder.pop_back(); + const auto value = helpers.top().functionBuilder.back().get(); + helpers.top().functionBuilder.pop_back(); + helpers.top().windowAggs.push_back({nebula_name}AggregationLogicalFunction::create(value, ts)); + }} + /* END CODEGEN AGGREGATION GLUE: {sql_token} (funcName chain) */ +""" + +# Site 3 — optimizer logical→physical lowering rule. +OPTIMIZER_LOWERING_TGEO = """\ + /* BEGIN CODEGEN AGGREGATION GLUE: {class_name_token} (optimizer lowering) */ + if (name == std::string_view("{class_name_token}")) + {{ + auto specificDescriptor = std::dynamic_pointer_cast<{nebula_name}AggregationLogicalFunction>(descriptor); + INVARIANT(specificDescriptor != nullptr, "Expected {nebula_name}AggregationLogicalFunction for {class_name_token}"); + + auto lonPF = QueryCompilation::FunctionProvider::lowerFunction(specificDescriptor->getLonField()); + auto latPF = QueryCompilation::FunctionProvider::lowerFunction(specificDescriptor->getLatField()); + auto tsPF = QueryCompilation::FunctionProvider::lowerFunction(specificDescriptor->getTimestampField()); + + Schema stateSchema; + stateSchema.addField("lon", specificDescriptor->getLonField().getDataType()); + stateSchema.addField("lat", specificDescriptor->getLatField().getDataType()); + stateSchema.addField("timestamp", specificDescriptor->getTimestampField().getDataType()); + auto tupleBufferRef = Interface::BufferRef::TupleBufferRef::create(configuration.pageSize.getValue(), stateSchema); + + auto phys = std::make_shared<{nebula_name}AggregationPhysicalFunction>( + std::move(physicalInputType), + std::move(physicalFinalType), + lonPF, + latPF, + tsPF, + resultFieldIdentifier, + tupleBufferRef); + aggregationPhysicalFunctions.push_back(std::move(phys)); + continue; + }} + /* END CODEGEN AGGREGATION GLUE: {class_name_token} (optimizer lowering) */ +""" + +OPTIMIZER_LOWERING_TNUMBER = """\ + /* BEGIN CODEGEN AGGREGATION GLUE: {class_name_token} (optimizer lowering) */ + if (name == std::string_view("{class_name_token}")) + {{ + auto specificDescriptor = std::dynamic_pointer_cast<{nebula_name}AggregationLogicalFunction>(descriptor); + INVARIANT(specificDescriptor != nullptr, "Expected {nebula_name}AggregationLogicalFunction for {class_name_token}"); + + auto valuePF = QueryCompilation::FunctionProvider::lowerFunction(specificDescriptor->getValueField()); + auto tsPF = QueryCompilation::FunctionProvider::lowerFunction(specificDescriptor->getTimestampField()); + + Schema stateSchema; + stateSchema.addField("value", specificDescriptor->getValueField().getDataType()); + stateSchema.addField("timestamp", specificDescriptor->getTimestampField().getDataType()); + auto tupleBufferRef = Interface::BufferRef::TupleBufferRef::create(configuration.pageSize.getValue(), stateSchema); + + auto phys = std::make_shared<{nebula_name}AggregationPhysicalFunction>( + std::move(physicalInputType), + std::move(physicalFinalType), + valuePF, + tsPF, + resultFieldIdentifier, + tupleBufferRef); + aggregationPhysicalFunctions.push_back(std::move(phys)); + continue; + }} + /* END CODEGEN AGGREGATION GLUE: {class_name_token} (optimizer lowering) */ +""" + +# =========================================================================== +# Expandable-Temporal* VALUE-OUTPUT: f(live mini-trip) -> Temporal* result, +# serialized to hex-WKB as VARSIZED (the proven box-output VARSIZED tail). +# Derived from PHYSICAL_CPP_TGEO_EXPAND by swapping only the scalar lower() for +# the value-output one. Wires the Temporal-returning single-temporal transforms +# (tgeo_centroid, tpoint_azimuth, tgeompoint_to_tgeometry, …) as windowed +# aggregates over the expandable trajectory. +# =========================================================================== +_EXPAND_LOWER_SCALAR = """\ + auto resultValue = nautilus::invoke( + +[](AggregationState* st) -> {return_cpp_type} + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + if (*slot == nullptr) {{ + return ({return_cpp_type})0; + }} + return {meos_scalar_fn}(*slot); + }}, + aggregationState); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, resultValue); + return resultRecord;""" + +_EXPAND_LOWER_WKB = """\ + auto hexStr = nautilus::invoke( + +[](AggregationState* st) -> char* + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + if (*slot == nullptr) {{ + return (char*)nullptr; + }} + Temporal* res = {meos_scalar_fn}(*slot); + if (!res) {{ + return (char*)nullptr; + }} + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + }}, + aggregationState); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> size_t {{ return s ? strlen(s) : (size_t) 0; }}, + hexStr); + + auto variableSized = pipelineMemoryProvider.arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, size_t len) -> void + {{ + if (s) {{ + memcpy(dest, s, len); + free((void*)s); + }} + }}, + variableSized.getContent(), + hexStr, + hexLen); + + Nautilus::Record resultRecord; + resultRecord.write(resultFieldIdentifier, variableSized); + return resultRecord;""" + +PHYSICAL_CPP_TGEO_EXPAND_WKB = _swap_once( + PHYSICAL_CPP_TGEO_EXPAND, _EXPAND_LOWER_SCALAR, _EXPAND_LOWER_WKB, + "expand scalar lower -> value-output (hex-WKB) lower") + +# geometry value-output: f(traj) returns a GSERIALIZED (start/end point, convex +# hull, time-weighted centroid of the windowed trajectory), serialized as +# canonical hex-EWKB via geo_out. Same Temporal* slot/lift/append; only the +# finalize differs from the temporal value-output (GSERIALIZED + geo_out, no +# hexSize out-param). +_EXPAND_LOWER_GEO_WKB = _swap_once( + _swap_once(_EXPAND_LOWER_WKB, + "Temporal* res = {meos_scalar_fn}(*slot);", + "GSERIALIZED* res = {meos_scalar_fn}(*slot);", + "value-output res type Temporal -> GSERIALIZED"), + "size_t hexSize = 0;\n char* hexOut = temporal_as_hexwkb(res, 0, &hexSize);", + "char* hexOut = geo_out(res);", + "temporal hex-WKB -> geometry hex-EWKB (geo_out)") + +PHYSICAL_CPP_TGEO_EXPAND_GEO_WKB = _swap_once( + PHYSICAL_CPP_TGEO_EXPAND, _EXPAND_LOWER_SCALAR, _EXPAND_LOWER_GEO_WKB, + "expand scalar lower -> geometry value-output (hex-EWKB) lower") + +# tnumber expandable value-output: same Temporal*-slot lower/reset/cleanup, but +# the per-event instant is a tfloat ("value@ts" via tfloat_in) and the ctor takes +# (value, ts). Derived from the tgeo expand-wkb template by swapping only the ctor +# and lift (the rest — Temporal* slot, appendInstant, value-output finalize — is +# input-shape-independent). +_EXPAND_CTOR_TGEO = """\ +{nebula_name}AggregationPhysicalFunction::{nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction lonFunctionParam, + PhysicalFunction latFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef) + : AggregationPhysicalFunction(std::move(inputType), std::move(resultType), lonFunctionParam, std::move(resultFieldIdentifier)) + , bufferRef(std::move(bufferRef)) + , lonFunction(std::move(lonFunctionParam)) + , latFunction(std::move(latFunctionParam)) + , timestampFunction(std::move(timestampFunctionParam)) +{{ +}}""" +_EXPAND_CTOR_TNUMBER = """\ +{nebula_name}AggregationPhysicalFunction::{nebula_name}AggregationPhysicalFunction( + DataType inputType, + DataType resultType, + PhysicalFunction valueFunctionParam, + PhysicalFunction timestampFunctionParam, + Nautilus::Record::RecordFieldIdentifier resultFieldIdentifier, + std::shared_ptr bufferRef) + : AggregationPhysicalFunction(std::move(inputType), std::move(resultType), valueFunctionParam, std::move(resultFieldIdentifier)) + , bufferRef(std::move(bufferRef)) + , valueFunction(std::move(valueFunctionParam)) + , timestampFunction(std::move(timestampFunctionParam)) +{{ +}}""" +_EXPAND_LIFT_TGEO = """\ + auto lonValue = lonFunction.execute(record, pipelineMemoryProvider.arena); + auto latValue = latFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + auto lon = lonValue.cast>(); + auto lat = latValue.cast>(); + auto timestamp = timestampValue.cast>(); + + nautilus::invoke( + +[](AggregationState* st, double lonVal, double latVal, int64_t tsVal) -> void + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + + long long sec = (tsVal > 1000000000000LL) ? (tsVal / 1000) : tsVal; + std::string ts = MEOS::Meos::convertSecondsToTimestamp(sec); + char wkt[120]; + snprintf(wkt, sizeof(wkt), "SRID=4326;Point(%.6f %.6f)@%s", lonVal, latVal, ts.c_str()); + + // Public instant constructor: a single-instant tgeompoint Temporal. + Temporal* instTemp = tgeompoint_in(wkt); + if (!instTemp) {{ + return; + }} + if (*slot == nullptr) {{ + // First event: a 1-instant sequence; subsequent appendInstant calls + // grow it in place (expand=true doubles maxcount when full). + TInstant* arr[1]; + arr[0] = (TInstant*) instTemp; + *slot = (Temporal*) tsequence_make((TInstant**) arr, 1, true, true, LINEAR, false); + }} else {{ + *slot = temporal_append_tinstant(*slot, (const TInstant*) instTemp, LINEAR, 0.0, nullptr, true); + }} + free(instTemp); // copied by tsequence_make / temporal_append_tinstant + }}, + aggregationState, + lon, + lat, + timestamp);""" +_EXPAND_LIFT_TNUMBER = """\ + auto valueValue = valueFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + auto value = valueValue.cast>(); + auto timestamp = timestampValue.cast>(); + + nautilus::invoke( + +[](AggregationState* st, double valueVal, int64_t tsVal) -> void + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + + long long sec = (tsVal > 1000000000000LL) ? (tsVal / 1000) : tsVal; + std::string ts = MEOS::Meos::convertSecondsToTimestamp(sec); + char wkt[80]; + snprintf(wkt, sizeof(wkt), "%.6f@%s", valueVal, ts.c_str()); + + // Public instant constructor: a single-instant tfloat Temporal. + Temporal* instTemp = tfloat_in(wkt); + if (!instTemp) {{ + return; + }} + if (*slot == nullptr) {{ + TInstant* arr[1]; + arr[0] = (TInstant*) instTemp; + *slot = (Temporal*) tsequence_make((TInstant**) arr, 1, true, true, LINEAR, false); + }} else {{ + *slot = temporal_append_tinstant(*slot, (const TInstant*) instTemp, LINEAR, 0.0, nullptr, true); + }} + free(instTemp); + }}, + aggregationState, + value, + timestamp);""" + +PHYSICAL_CPP_TNUMBER_EXPAND_WKB = _swap_once( + _swap_once(PHYSICAL_CPP_TGEO_EXPAND_WKB, _EXPAND_CTOR_TGEO, _EXPAND_CTOR_TNUMBER, "expand ctor tgeo->tnumber"), + _EXPAND_LIFT_TGEO, _EXPAND_LIFT_TNUMBER, "expand lift tgeo->tnumber") + +# tnpoint expandable value-output: reuses the 3-field tgeo HPP/parser/optimizer +# (the 3 args are rid, frac, ts); only the lift (NPoint instant via tnpoint_in) +# and the npoint include change. Wires tnpoint trajectory transforms over the +# windowed tnpoint mini-series. +_EXPAND_LIFT_TNPOINT = """\ + auto ridValue = lonFunction.execute(record, pipelineMemoryProvider.arena); + auto fracValue = latFunction.execute(record, pipelineMemoryProvider.arena); + auto timestampValue = timestampFunction.execute(record, pipelineMemoryProvider.arena); + + auto rid = ridValue.cast>(); + auto frac = fracValue.cast>(); + auto timestamp = timestampValue.cast>(); + + nautilus::invoke( + +[](AggregationState* st, int64_t ridVal, double fracVal, int64_t tsVal) -> void + {{ + MEOS::Meos::ensureMeosInitialized(); + std::lock_guard lock({mutex_name}); + Temporal** slot = reinterpret_cast(st); + + long long sec = (tsVal > 1000000000000LL) ? (tsVal / 1000) : tsVal; + std::string ts = MEOS::Meos::convertSecondsToTimestamp(sec); + char wkt[80]; + snprintf(wkt, sizeof(wkt), "NPoint(%lld,%.6f)@%s", (long long) ridVal, fracVal, ts.c_str()); + + Temporal* instTemp = tnpoint_in(wkt); + if (!instTemp) {{ + return; + }} + if (*slot == nullptr) {{ + TInstant* arr[1]; + arr[0] = (TInstant*) instTemp; + *slot = (Temporal*) tsequence_make((TInstant**) arr, 1, true, true, LINEAR, false); + }} else {{ + *slot = temporal_append_tinstant(*slot, (const TInstant*) instTemp, LINEAR, 0.0, nullptr, true); + }} + free(instTemp); + }}, + aggregationState, + rid, + frac, + timestamp);""" + +PHYSICAL_CPP_TNPOINT_EXPAND_WKB = _swap_once( + _swap_once(PHYSICAL_CPP_TGEO_EXPAND_WKB, _EXPAND_LIFT_TGEO, _EXPAND_LIFT_TNPOINT, "expand lift tgeo->tnpoint"), + "#include ", "#include \n#include ", "tnpoint include") + + +# =========================================================================== +# Shape dispatchers + emit_operator. +# =========================================================================== + +def physical_template_for(op): + box = op.get("return_mode") == "box" + if op["input_shape"] == "tgeo": + if op.get("return_mode") == "wkb": + return PHYSICAL_HPP_TGEO, PHYSICAL_CPP_TGEO_WKB + if op.get("return_mode") == "expand": + return PHYSICAL_HPP_TGEO, PHYSICAL_CPP_TGEO_EXPAND + if op.get("return_mode") == "expand_wkb": + return PHYSICAL_HPP_TGEO, PHYSICAL_CPP_TGEO_EXPAND_WKB + if op.get("return_mode") == "expand_geo_wkb": + return PHYSICAL_HPP_TGEO, PHYSICAL_CPP_TGEO_EXPAND_GEO_WKB + if op.get("return_mode") == "expand_wkb_tnpoint": + return PHYSICAL_HPP_TGEO, PHYSICAL_CPP_TNPOINT_EXPAND_WKB + return PHYSICAL_HPP_TGEO, (PHYSICAL_CPP_TGEO_BOX if box else PHYSICAL_CPP_TGEO) + if op["input_shape"] == "tnumber": + # Scalar-fold reuses the tnumber (value, ts) HPP but folds the field + # directly through the MEOS extent transition fn (no string / no parse); + # set-collect is the same shape with a Set state + a union finalfn. + if op.get("return_mode") == "expand_wkb": + return PHYSICAL_HPP_TNUMBER, PHYSICAL_CPP_TNUMBER_EXPAND_WKB + if op.get("fold") == "scalar": + return PHYSICAL_HPP_TNUMBER, PHYSICAL_CPP_SCALARFOLD + if op.get("fold") == "set": + return PHYSICAL_HPP_TNUMBER, PHYSICAL_CPP_SETFOLD + return PHYSICAL_HPP_TNUMBER, (PHYSICAL_CPP_TNUMBER_BOX if box else PHYSICAL_CPP_TNUMBER) + raise ValueError(f"unknown input_shape: {op['input_shape']}") + + +def logical_template_for(op): + if op["input_shape"] == "tgeo": + return LOGICAL_HPP_TGEO, LOGICAL_CPP_TGEO + if op["input_shape"] == "tnumber": + return LOGICAL_HPP_TNUMBER, LOGICAL_CPP_TNUMBER + raise ValueError(f"unknown input_shape: {op['input_shape']}") + + +def case_switch_template_for(op): + return CASE_SWITCH_TGEO if op["input_shape"] == "tgeo" else CASE_SWITCH_TNUMBER + + +def funcname_chain_template_for(op): + return FUNCNAME_CHAIN_TGEO if op["input_shape"] == "tgeo" else FUNCNAME_CHAIN_TNUMBER + + +def optimizer_lowering_template_for(op): + return OPTIMIZER_LOWERING_TGEO if op["input_shape"] == "tgeo" else OPTIMIZER_LOWERING_TNUMBER + + +def emit_operator(op, output_root: Path): + nebula_name = op["nebula_name"] + logical_hpp_tmpl, logical_cpp_tmpl = logical_template_for(op) + physical_hpp_tmpl, physical_cpp_tmpl = physical_template_for(op) + + # Common substitution dict. + fmt = { + "nebula_name": nebula_name, + "class_name_token": op["class_name_token"], + "sql_token": op["sql_token"], + "comment_one_liner": op["comment_one_liner"], + "meos_scalar_fn": op.get("meos_scalar_fn", ""), + "return_cpp_type": op.get("return_cpp_type", "double"), + "final_stamp_type": op["final_stamp_type"], + "mutex_name": f"meos_{nebula_name.lower()}_mutex", + # tnumber-only extras (harmless for tgeo since unused) + "lift_value_cpp_type": op.get("lift_value_cpp_type", "double"), + "value_printf_fmt": op.get("value_printf_fmt", "%.6f"), + "tnumber_in_fn": op.get("tnumber_in_fn", "tfloat_in"), + # box-output (VARSIZED extent) extras — only referenced by the *_BOX + # physical templates; harmless for scalar ops. + "extent_transfn": op.get("extent_transfn", ""), + "extent_box_type": op.get("extent_box_type", "STBox"), + "box_out_fn": op.get("box_out_fn", ""), + # scalar-fold / set-collect extras — referenced by the *FOLD templates. + "fold_field_cpp_type": op.get("fold_field_cpp_type", "double"), + "fold_invoke_body": op.get("fold_invoke_body", ""), + "box_out_call": op.get("box_out_call", ""), + "finalfn": op.get("finalfn", ""), + } + + # value_compute (point/tgeo finalize): either fold the windowed sequence + # directly with meos_scalar_fn, or — for the EXTENT shape — first reduce the + # sequence to its bounding box (tspatial_to_stbox / ...) and apply a box + # accessor/predicate to that windowed extent. In box-output mode the + # finalize is the serialized extent box itself (no value_compute). + box_build = op.get("extent_box_build_fn") + if op.get("return_mode") in ("box", "wkb"): + fmt["value_compute"] = "" + elif box_build: + box_t = op.get("extent_box_type", "STBox") + fmt["value_compute"] = ( + f'{box_t}* aggBox = {box_build}(static_cast(temp));\n' + f' {op["return_cpp_type"]} value = aggBox ? ' + f'{op["meos_scalar_fn"]}(aggBox) : ({op["return_cpp_type"]})0;\n' + f' if (aggBox) free(aggBox);') + else: + fmt["value_compute"] = ( + f'{op["return_cpp_type"]} value = ' + f'{op["meos_scalar_fn"]}(static_cast(temp));') + + paths = { + "logical_hpp": output_root / "nes-logical-operators/include/Operators/Windows/Aggregations/Meos" / f"{nebula_name}AggregationLogicalFunction.hpp", + "logical_cpp": output_root / "nes-logical-operators/src/Operators/Windows/Aggregations/Meos" / f"{nebula_name}AggregationLogicalFunction.cpp", + "physical_hpp": output_root / "nes-physical-operators/include/Aggregation/Function/Meos" / f"{nebula_name}AggregationPhysicalFunction.hpp", + "physical_cpp": output_root / "nes-physical-operators/src/Aggregation/Function/Meos" / f"{nebula_name}AggregationPhysicalFunction.cpp", + } + for p in paths.values(): + p.parent.mkdir(parents=True, exist_ok=True) + + paths["logical_hpp"].write_text(logical_hpp_tmpl.format(**fmt)) + paths["logical_cpp"].write_text(logical_cpp_tmpl.format(**fmt)) + paths["physical_hpp"].write_text(physical_hpp_tmpl.format(**fmt)) + paths["physical_cpp"].write_text(physical_cpp_tmpl.format(**fmt)) + sys.stderr.write(f" ✓ {nebula_name}: emitted 4 files\n") + + +# =========================================================================== +# Idempotent injectors. +# =========================================================================== + +def inject_cmake_entries(operators, output_root: Path) -> int: + """Append per-op `add_plugin(...)` entries to both layers' aggregation + CMakeLists. Idempotent: skips entries already present.""" + n_added = 0 + # Layer (logical | physical) → (CMakeLists path, plugin suffix) + layers = [ + ("logical", output_root / "nes-logical-operators/src/Operators/Windows/Aggregations/Meos/CMakeLists.txt", "Logical"), + ("physical", output_root / "nes-physical-operators/src/Aggregation/Function/Meos/CMakeLists.txt", "Physical"), + ] + for label, cml, suffix in layers: + if not cml.exists(): + sys.stderr.write(f" ! cmake-entries: {cml} not found, skipping {label}\n") + continue + body = cml.read_text() + new_lines = [] + for op in operators: + # Target name must NOT include "Aggregation" suffix — the registry codegen + # appends "Aggregation" itself, so a "...Aggregation" target + # would yield a double-Aggregation symbol. Mariana's convention is the + # target name = the SQL-side aggregation name (e.g. "TemporalLength"), + # NOT the C++ class basename. We follow that. + target_name = op["nebula_name"] + suffix_kind = "AggregationLogicalFunction" if label == "logical" else "AggregationPhysicalFunction" + registry_kind = "AggregationLogicalFunction" if label == "logical" else "AggregationPhysicalFunction" + cpp_basename = f"{op['nebula_name']}{suffix_kind}.cpp" + entry = ( + f"add_plugin({target_name} {registry_kind} " + f"nes-{label}-operators {cpp_basename})" + ) + # Match by basename to be tolerant of formatting drift + marker = f"add_plugin({target_name} {registry_kind}" + if marker in body: + continue + new_lines.append(entry) + if new_lines: + with cml.open("a") as f: + f.write("\n".join(new_lines) + "\n") + sys.stderr.write(f" ✓ cmake-entries ({label}): appended {len(new_lines)} entry(ies)\n") + n_added += len(new_lines) + return n_added + + +def inject_g4(operators, g4_path: Path) -> int: + """Inject lexer-token + functionName alternation entries into AntlrSQL.g4.""" + if not g4_path.exists(): + sys.stderr.write(f" ! g4: {g4_path} not found, skipping\n") + return 0 + body = g4_path.read_text() + n_added = 0 + + new_tokens = [] + for op in operators: + tok = op["sql_token"] + if re.search(rf"^{re.escape(tok)}\s*:", body, re.MULTILINE): + continue + new_tokens.append(f"{tok}: '{tok}' | '{tok.lower()}';") + if new_tokens: + if "/* BEGIN CODEGEN AGGREGATION LEXER TOKENS */" in body: + body = re.sub( + r"(/\* BEGIN CODEGEN AGGREGATION LEXER TOKENS \*/\n)(.*?)(/\* END CODEGEN AGGREGATION LEXER TOKENS \*/)", + lambda mm: mm.group(1) + mm.group(2) + "\n".join(new_tokens) + "\n" + mm.group(3), + body, count=1, flags=re.DOTALL, + ) + else: + anchor_re = re.compile(r"^WATERMARK:.*$", re.MULTILINE) + m = anchor_re.search(body) + if m is None: + sys.stderr.write(f" ! g4: WATERMARK anchor not found\n") + else: + insertion = ( + "/* BEGIN CODEGEN AGGREGATION LEXER TOKENS */\n" + + "\n".join(new_tokens) + + "\n/* END CODEGEN AGGREGATION LEXER TOKENS */\n" + ) + body = body[: m.start()] + insertion + body[m.start():] + n_added += len(new_tokens) + sys.stderr.write(f" ✓ g4 lexer-tokens: added {len(new_tokens)} token(s)\n") + + # functionName alternation + fn_re = re.compile(r"^functionName:\s*([^;]+);", re.MULTILINE) + m = fn_re.search(body) + if m is None: + sys.stderr.write(f" ! g4: functionName production not found\n") + else: + alternation = m.group(1) + new_alts = [] + for op in operators: + tok = op["sql_token"] + if re.search(rf"\b{re.escape(tok)}\b", alternation): + continue + new_alts.append(tok) + if new_alts: + new_alt_text = alternation.rstrip() + " | " + " | ".join(new_alts) + body = body[: m.start()] + f"functionName: {new_alt_text};" + body[m.end():] + sys.stderr.write(f" ✓ g4 functionName: added {len(new_alts)} alternative(s)\n") + + g4_path.write_text(body) + return n_added + + +def inject_parser_cpp(operators, cpp_path: Path) -> int: + """Inject TWO dispatch sites + per-op #include.""" + if not cpp_path.exists(): + sys.stderr.write(f" ! parser-cpp: {cpp_path} not found, skipping\n") + return 0 + body = cpp_path.read_text() + n_added = 0 + + # 1) #includes — insert after the LAST `#include ` line. + new_includes = [] + for op in operators: + inc = f"#include " + if inc in body: + continue + new_includes.append(inc) + if new_includes: + agg_inc_re = re.compile(r"(^#include ]+>\s*\n)+", re.MULTILINE) + matches = list(agg_inc_re.finditer(body)) + if matches: + last = matches[-1] + body = body[: last.end()] + "\n".join(new_includes) + "\n" + body[last.end():] + sys.stderr.write(f" ✓ parser-cpp aggregation includes: added {len(new_includes)}\n") + else: + # Fall back: insert after any Meos include + meos_inc_re = re.compile(r"(^#include ]+>\s*\n)+", re.MULTILINE) + matches = list(meos_inc_re.finditer(body)) + if matches: + last = matches[-1] + body = body[: last.end()] + "\n".join(new_includes) + "\n" + body[last.end():] + sys.stderr.write(f" ✓ parser-cpp aggregation includes (fallback): added {len(new_includes)}\n") + else: + sys.stderr.write(f" ! parser-cpp: no Meos include anchor found\n") + + # 2) Case-switch dispatch — insert after the last `END CODEGEN AGGREGATION GLUE: ... (case-switch)` + # marker, else before the `default:` of the switch that contains TGEO_AT_STBOX. + new_case_blocks = [] + for op in operators: + tmpl = case_switch_template_for(op) + marker = f"/* BEGIN CODEGEN AGGREGATION GLUE: {op['sql_token']} (case-switch) */" + if marker in body: + continue + # Skip if pre-existing hand-written case + if re.search(rf"case\s+AntlrSQLLexer::{re.escape(op['sql_token'])}\s*:", body): + sys.stderr.write( + f" ! parser-cpp: pre-existing case for {op['sql_token']} (case-switch); skipping\n" + ) + continue + new_case_blocks.append(tmpl.format( + sql_token=op["sql_token"], nebula_name=op["nebula_name"], comment_one_liner=op["comment_one_liner"], + )) + if new_case_blocks: + # Anchor preference order: + # 1. last `END CODEGEN AGGREGATION GLUE: ... (case-switch)` (own marker) + # 2. last `END CODEGEN PARSER GLUE: ...` (codegen_nebula.py W4.5+) + # 3. TGEO_AT_STBOX → default: (pre-W4.5 layout) + last_end_agg = list(re.finditer(r"/\* END CODEGEN AGGREGATION GLUE: [^*]+\(case-switch\)\s*\*/", body)) + last_end_nebula = list(re.finditer(r"/\* END CODEGEN PARSER GLUE: [^*]+\*/", body)) + if last_end_agg: + insert_at = last_end_agg[-1].end() + body = body[:insert_at] + "\n" + "\n".join(new_case_blocks) + body[insert_at:] + sys.stderr.write(f" ✓ parser-cpp case-switch: added {len(new_case_blocks)} (after own marker)\n") + elif last_end_nebula: + insert_at = last_end_nebula[-1].end() + body = body[:insert_at] + "\n" + "\n".join(new_case_blocks) + body[insert_at:] + sys.stderr.write(f" ✓ parser-cpp case-switch: added {len(new_case_blocks)} (after codegen_nebula marker)\n") + else: + anchor_re = re.compile(r"(case AntlrSQLLexer::TGEO_AT_STBOX:[\s\S]+?\n\s*break;\n)(\s*default:)") + m = anchor_re.search(body) + if m is None: + sys.stderr.write(f" ! parser-cpp: no case-switch anchor found\n") + else: + insertion = m.group(1) + "\n" + "\n".join(new_case_blocks) + "\n" + m.group(2) + body = body[: m.start()] + insertion + body[m.end():] + sys.stderr.write(f" ✓ parser-cpp case-switch: added {len(new_case_blocks)} (before default:)\n") + n_added += len(new_case_blocks) + + # 3) funcName-chain dispatch — insert after the last `END CODEGEN AGGREGATION GLUE: ... (funcName chain)`, + # else after mariana's CrossDistance else-if block. + new_chain_blocks = [] + for op in operators: + tmpl = funcname_chain_template_for(op) + marker = f"/* BEGIN CODEGEN AGGREGATION GLUE: {op['sql_token']} (funcName chain) */" + if marker in body: + continue + if re.search(rf'funcName == "{re.escape(op["sql_token"])}"', body): + sys.stderr.write( + f" ! parser-cpp: pre-existing funcName chain for {op['sql_token']}; skipping\n" + ) + continue + new_chain_blocks.append(tmpl.format(sql_token=op["sql_token"], nebula_name=op["nebula_name"])) + if new_chain_blocks: + last_end_re = re.compile(r"/\* END CODEGEN AGGREGATION GLUE: [^*]+\(funcName chain\)\s*\*/") + ends = list(last_end_re.finditer(body)) + if ends: + insert_at = ends[-1].end() + body = body[:insert_at] + "\n" + "\n".join(new_chain_blocks) + body[insert_at:] + sys.stderr.write(f" ✓ parser-cpp funcName chain: added {len(new_chain_blocks)} (after marker)\n") + else: + anchor_re = re.compile( + r'(else if \(funcName == "CROSS_DISTANCE"\)[\s\S]+?\n\s*\}\n)', + ) + m = anchor_re.search(body) + if m is None: + sys.stderr.write(f" ! parser-cpp: no funcName chain anchor (after CROSS_DISTANCE) found\n") + else: + insertion = m.group(1) + "\n".join(new_chain_blocks) + body = body[: m.end()] + "\n".join(new_chain_blocks) + body[m.end():] + sys.stderr.write(f" ✓ parser-cpp funcName chain: added {len(new_chain_blocks)} (after CROSS_DISTANCE)\n") + n_added += len(new_chain_blocks) + + cpp_path.write_text(body) + return n_added + + +def inject_optimizer(operators, opt_path: Path) -> int: + """Inject `if (name == "...")` blocks into LowerToPhysicalWindowedAggregation.cpp.""" + if not opt_path.exists(): + sys.stderr.write(f" ! optimizer: {opt_path} not found, skipping\n") + return 0 + body = opt_path.read_text() + n_added = 0 + + # 1) #include for the physical class header + new_includes = [] + for op in operators: + inc = f"#include " + if inc in body: + continue + new_includes.append(inc) + # Also need the logical class header + new_logical_includes = [] + for op in operators: + inc = f"#include " + if inc in body: + continue + new_logical_includes.append(inc) + if new_includes or new_logical_includes: + agg_inc_re = re.compile(r"(^#include ]+>\s*\n)+", re.MULTILINE) + matches = list(agg_inc_re.finditer(body)) + if matches: + last = matches[-1] + inserts = [] + if new_includes: + inserts.extend(new_includes) + if new_logical_includes: + inserts.extend(new_logical_includes) + body = body[: last.end()] + "\n".join(inserts) + "\n" + body[last.end():] + sys.stderr.write(f" ✓ optimizer includes: added {len(new_includes)} phys + {len(new_logical_includes)} logical\n") + else: + sys.stderr.write(f" ! optimizer: no Aggregation/Function/Meos include anchor found\n") + + # 2) The if-name-match block. Insert after last codegen END marker, else after mariana's CrossDistance block. + new_blocks = [] + for op in operators: + tmpl = optimizer_lowering_template_for(op) + marker = f"/* BEGIN CODEGEN AGGREGATION GLUE: {op['class_name_token']} (optimizer lowering) */" + if marker in body: + continue + # Skip if a pre-existing hand-written block exists for this class_name_token + if re.search(rf'name == std::string_view\("{re.escape(op["class_name_token"])}"\)', body): + sys.stderr.write( + f" ! optimizer: pre-existing lowering block for {op['class_name_token']}; skipping\n" + ) + continue + new_blocks.append(tmpl.format(class_name_token=op["class_name_token"], nebula_name=op["nebula_name"])) + if new_blocks: + last_end_re = re.compile(r"/\* END CODEGEN AGGREGATION GLUE: [^*]+\(optimizer lowering\)\s*\*/") + ends = list(last_end_re.finditer(body)) + if ends: + insert_at = ends[-1].end() + body = body[:insert_at] + "\n" + "\n".join(new_blocks) + body[insert_at:] + sys.stderr.write(f" ✓ optimizer lowering: added {len(new_blocks)} (after marker)\n") + else: + # Anchor: insert just before the "Default path: use registry" comment. + anchor_re = re.compile(r"(\n\s*// Default path: use registry)") + m = anchor_re.search(body) + if m is None: + sys.stderr.write(f" ! optimizer: 'Default path' anchor not found\n") + else: + insertion = "\n" + "\n".join(new_blocks) + m.group(1) + body = body[: m.start()] + insertion + body[m.end():] + sys.stderr.write(f" ✓ optimizer lowering: added {len(new_blocks)} (before Default path)\n") + n_added += len(new_blocks) + + opt_path.write_text(body) + return n_added + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--input", required=True) + parser.add_argument("--output-root", required=True) + parser.add_argument("--no-parser-glue", action="store_true") + parser.add_argument("--no-cmake-entries", action="store_true") + parser.add_argument("--no-optimizer-glue", action="store_true") + args = parser.parse_args() + + with open(args.input) as f: + config = json.load(f) + operators = config["operators"] + + # The serialized aggregation type (NAME), the optimizer-lowering match, and + # the registry key must be the same string for the query plan to round-trip + # (serialize set_type(NAME) -> worker create(type) -> registry key). The + # registry key is the add_plugin target = nebula_name (PascalCase), so + # class_name_token (which drives NAME + the optimizer match) MUST equal + # nebula_name. Earlier specs set it to the SQL token (UPPER_SNAKE), which + # made create(type) miss the registry and throw UnknownLogicalOperator at + # deserialize. The SQL spelling lives in sql_token (lexer/parser); it never + # belongs in NAME. Normalize here so a stray spec value cannot reintroduce + # the mismatch. + for op in operators: + op["class_name_token"] = op["nebula_name"] + + output_root = Path(args.output_root).resolve() + if not (output_root / "nes-logical-operators").exists(): + sys.exit(f"ERROR: {output_root} does not look like MobilityNebula root") + + sys.stderr.write(f"Emitting {len(operators)} aggregation operator(s):\n\n") + for op in operators: + emit_operator(op, output_root) + + if not args.no_cmake_entries: + sys.stderr.write("\nCMakeLists.txt:\n") + inject_cmake_entries(operators, output_root) + + if not args.no_parser_glue: + sys.stderr.write("\nParser glue:\n") + inject_g4(operators, output_root / "nes-sql-parser/AntlrSQL.g4") + inject_parser_cpp(operators, output_root / "nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp") + + if not args.no_optimizer_glue: + sys.stderr.write("\nOptimizer lowering glue:\n") + inject_optimizer(operators, output_root / "nes-query-optimizer/src/RewriteRules/LowerToPhysical/LowerToPhysicalWindowedAggregation.cpp") + + sys.stderr.write(f"\nDone. {len(operators) * 4} files emitted.\n") + + +if __name__ == "__main__": + main() diff --git a/tools/codegen/codegen_nebula.py b/tools/codegen/codegen_nebula.py new file mode 100644 index 0000000000..5adad3fb73 --- /dev/null +++ b/tools/codegen/codegen_nebula.py @@ -0,0 +1,6658 @@ +#!/usr/bin/env python3 +"""MobilityNebula MEOS-operator generator. + +Given a JSON descriptor list of MEOS scalar functions to wrap as +NebulaStream operators, emits the 4 pipeline-layer C++ files per +function (logical .hpp/.cpp + physical .hpp/.cpp) following the +established style of the existing hand-written operators (e.g. +TemporalEDWithinGeometryLogicalFunction), AND auto-injects: + +- per-op CMakeLists.txt entries in nes-{logical,physical}-operators/ + src/Functions/Meos/ +- AntlrSQL.g4 lexer-token + functionName-alternation entries +- AntlrSQLQueryPlanCreator.cpp #include + dispatch-case block + +Injection is idempotent — markers like +`/* BEGIN CODEGEN PARSER GLUE: */ … /* END CODEGEN PARSER GLUE */` +gate each per-op block, and the script skips on re-run when the marker +is already present. + +Usage: + python3 codegen_nebula.py --input codegen_input.example.json \\ + --output-root /path/to/MobilityNebula \\ + [--no-parser-glue] # skip .g4 + parser .cpp + [--no-cmake-entries] # skip CMakeLists.txt +""" +import argparse +import json +import re +import sys +from pathlib import Path + +# =========================================================================== +# Templates (mirror the hand-written TemporalEDWithinGeometry style 1:1). +# =========================================================================== + +LOGICAL_HPP_TEMPLATE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES {{ + +/** + * @brief {comment_one_liner} + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `{meos_call}`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class {nebula_name}LogicalFunction : public LogicalFunctionConcept {{ +public: + static constexpr std::string_view NAME = "{nebula_name}"; + + {nebula_name}LogicalFunction({ctor_logical_args}); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}}; + +}} // namespace NES +""" + +LOGICAL_CPP_TEMPLATE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{{ + +{nebula_name}LogicalFunction::{nebula_name}LogicalFunction({ctor_logical_args}) + : dataType(DataTypeProvider::provideDataType(DataType::Type::{nautilus_return})) +{{ + parameters.reserve({n_args}); +{ctor_logical_pushes} +}} + +DataType {nebula_name}LogicalFunction::getDataType() const +{{ + return dataType; +}} + +LogicalFunction {nebula_name}LogicalFunction::withDataType(const DataType& newDataType) const +{{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +}} + +std::vector {nebula_name}LogicalFunction::getChildren() const +{{ + return parameters; +}} + +LogicalFunction {nebula_name}LogicalFunction::withChildren(const std::vector& children) const +{{ + PRECONDITION(children.size() == {n_args}, "{nebula_name}LogicalFunction requires {n_args} children, but got {{}}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +}} + +std::string_view {nebula_name}LogicalFunction::getType() const +{{ + return NAME; +}} + +bool {nebula_name}LogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{{ + if (const auto* other = dynamic_cast(&rhs)) + {{ + return parameters == other->parameters; + }} + return false; +}} + +std::string {nebula_name}LogicalFunction::explain(ExplainVerbosity verbosity) const +{{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + {{ + if (index > 0) + {{ + args += ", "; + }} + args += parameters[index].explain(verbosity); + }} + return fmt::format("{{}}({{}})", NAME, args); +}} + +LogicalFunction {nebula_name}LogicalFunction::withInferredDataType(const Schema& schema) const +{{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + {{ + newChildren.emplace_back(child.withInferredDataType(schema)); + }} + return withChildren(newChildren); +}} + +SerializableFunction {nebula_name}LogicalFunction::serialize() const +{{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + {{ + proto.add_children()->CopyFrom(child.serialize()); + }} + return proto; +}} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::Register{nebula_name}LogicalFunction( + LogicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.children.size() == {n_args}, + "{nebula_name}LogicalFunction requires {n_args} children but got {{}}", + arguments.children.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + +PHYSICAL_HPP_TEMPLATE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES {{ + +/** + * @brief Physical operator for `{meos_call}`. + * + * {comment_one_liner} + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class {nebula_name}PhysicalFunction : public PhysicalFunctionConcept {{ +public: + {nebula_name}PhysicalFunction({ctor_physical_args}); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}}; + +}} // namespace NES +""" + +# Physical .cpp template; the `body` placeholder is the MEOS-call body +# (the heart of the operator). For `build_temporal_point` operators +# we emit a per-event temporal-point build + MEOS call, mirroring +# TemporalEDWithinGeometry; for non-temporal-point operators (future +# templates) the body shape differs and a separate template branch +# would be added here. +PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) {{ + return 0; + }} + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return {meos_call}(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + +# Physical .cpp template for two-temporal-points operators (e.g. *_tgeo_tgeo +# spatial-relations). Two single-instant tgeompoints are built from event +# fields (lonA/latA/tsA + lonB/latB/tsB) and passed to a MEOS function whose +# C signature is `int fn(const Temporal*, const Temporal*)`. Mirrors the +# one-temporal-point template above; the bodies differ only in arg shape +# and in the absence of a static-geometry argument. +PHYSICAL_CPP_TEMPLATE_TWO_TEMPORAL_POINTS = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return {meos_call}(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for one-temporal-point operators with a trailing +# `double dist` argument (e.g. edwithin_tgeo_geo / adwithin_tgeo_geo). Same +# layout as PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT but the MEOS call passes +# `dist` as the 3rd argument. +PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT_WITH_DIST = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize, + double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS *_tgeo_geo with trailing distance arg + // — int fn(const Temporal*, const GSERIALIZED*, double). + return {meos_call}(temporalGeometry.getGeometry(), + staticGeometry.getGeometry(), + distValue); + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + +# Physical .cpp template for two-temporal-points operators with a trailing +# `double dist` argument (edwithin_tgeo_tgeo / adwithin_tgeo_tgeo). +PHYSICAL_CPP_TEMPLATE_TWO_TEMPORAL_POINTS_WITH_DIST = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue, + double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo with trailing distance arg + // — int fn(const Temporal*, const Temporal*, double). + return {meos_call}(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry(), + distValue); + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lonA, latA, tsA, lonB, latB, tsB, dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# =========================================================================== +# Trgeometry operator templates (W148/W149 wave). +# +# Physical CPP builders for the 5 trgeometry spatial-predicate layouts +# plus 2 NAD variants. Called directly from emit_operator() instead of +# being .format()-expanded, because the C++ bodies contain literal braces. +# +# Logical HPP/CPP: two style variants ("compact" = Eintersects style, +# "nad" = NadTrgeometry / AlwaysEq / EverEq multi-line style). +# =========================================================================== + +_TRGEO_LICENSE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/""" + +_TRGEO_PHYS_INCLUDES_VS = """\ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include """ + +_TRGEO_PHYS_INCLUDES_NO_VS = """\ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include """ + + +def _trgeo_phys_header(nebula_name, includes): + return ( + _TRGEO_LICENSE + "\n\n" + + f"#include \n" + + includes + "\n\n" + + "extern \"C\" {\n" + + "#include \n" + + "#include \n" + + "#include \n" + + "#include \n" + + "}\n\n" + + "namespace NES {\n\n" + ) + + +def _trgeo_reg_compact(nebula_name, n): + """Registrar block: compact style (== without spaces, 34-space arg indent).""" + pad = " " + args = "\n".join( + pad + f"std::move(arguments.childFunctions[{i}])" + ("," if i < n - 1 else ")") + for i in range(n) + ) + return ( + f"\nPhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::" + f"Register{nebula_name}PhysicalFunction(\n" + f" PhysicalFunctionRegistryArguments arguments)\n" + f"{{\n" + f" PRECONDITION(arguments.childFunctions.size()=={n},\n" + f" \"{nebula_name}PhysicalFunction requires {n} children but got {{}}\",\n" + f" arguments.childFunctions.size());\n" + f" return {nebula_name}PhysicalFunction(\n" + f"{args};\n" + f"}}\n\n" + f"}} // namespace NES\n" + ) + + +def _trgeo_reg_nad(nebula_name, n): + """Registrar block: nad/multiline style (== with spaces, 34-space indent).""" + pad = " " + args = "\n".join( + pad + f"std::move(arguments.childFunctions[{i}])" + ("," if i < n - 1 else ")") + for i in range(n) + ) + return ( + f"\nPhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::" + f"Register{nebula_name}PhysicalFunction(\n" + f" PhysicalFunctionRegistryArguments arguments)\n" + f"{{\n" + f" PRECONDITION(arguments.childFunctions.size() == {n},\n" + f" \"{nebula_name}PhysicalFunction requires {n} children but got {{}}\",\n" + f" arguments.childFunctions.size());\n" + f" return {nebula_name}PhysicalFunction(\n" + f"{args};\n" + f"}}\n\n" + f"}} // namespace NES\n" + ) + + +# ---------- Logical HPP helpers ---------------------------------------- + +def _trgeo_logical_hpp_compact(nebula_name, brief, ctor_args): + ctor = ", ".join(f"LogicalFunction {a}" for a in ctor_args) + return ( + _TRGEO_LICENSE + "\n\n" + "#pragma once\n\n" + "#include \n" + "#include \n" + "#include \n" + "#include \n\n" + "namespace NES {\n\n" + "/**\n" + f" * @brief {brief}\n" + " */\n" + f"class {nebula_name}LogicalFunction : public LogicalFunctionConcept {{\n" + "public:\n" + f" static constexpr std::string_view NAME = \"{nebula_name}\";\n" + f" {nebula_name}LogicalFunction({ctor});\n" + " DataType getDataType() const override;\n" + " LogicalFunction withDataType(const DataType& dataType) const override;\n" + " std::vector getChildren() const override;\n" + " LogicalFunction withChildren(const std::vector& children) const override;\n" + " std::string_view getType() const override;\n" + " bool operator==(const LogicalFunctionConcept& rhs) const override;\n" + " std::string explain(ExplainVerbosity verbosity) const override;\n" + " LogicalFunction withInferredDataType(const Schema& schema) const override;\n" + " SerializableFunction serialize() const override;\n" + "private:\n" + " DataType dataType;\n" + " std::vector parameters;\n" + "};\n\n" + "} // namespace NES\n" + ) + + +def _trgeo_logical_hpp_nad(nebula_name, brief, ctor_args): + ctor = ", ".join(f"LogicalFunction {a}" for a in ctor_args) + return ( + _TRGEO_LICENSE + "\n\n" + "#pragma once\n\n" + "#include \n" + "#include \n" + "#include \n" + "#include \n\n" + "namespace NES {\n\n" + "/**\n" + f" * @brief {brief}\n" + " */\n" + f"class {nebula_name}LogicalFunction : public LogicalFunctionConcept {{\n" + "public:\n" + f" static constexpr std::string_view NAME = \"{nebula_name}\";\n\n" + f" {nebula_name}LogicalFunction({ctor});\n\n" + " DataType getDataType() const override;\n" + " LogicalFunction withDataType(const DataType& dataType) const override;\n" + " std::vector getChildren() const override;\n" + " LogicalFunction withChildren(const std::vector& children) const override;\n" + " std::string_view getType() const override;\n" + " bool operator==(const LogicalFunctionConcept& rhs) const override;\n" + " std::string explain(ExplainVerbosity verbosity) const override;\n" + " LogicalFunction withInferredDataType(const Schema& schema) const override;\n" + " SerializableFunction serialize() const override;\n\n" + "private:\n" + " DataType dataType;\n" + " std::vector parameters;\n" + "};\n\n" + "} // namespace NES\n" + ) + + +# ---------- Logical CPP helpers ---------------------------------------- + +def _trgeo_logical_cpp_compact(nebula_name, ctor_args, invariants, ret="FLOAT64"): + n = len(ctor_args) + ctor = ", ".join(f"LogicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" parameters.push_back(std::move({a}));" for a in ctor_args) + inv = "\n".join( + f" INVARIANT(c[{i}].getDataType().isType(DataType::Type::{t}), \"{nm} must be {t}\");" + for i, t, nm in invariants + ) + reg_args = "\n".join( + " std::move(arguments.children[" + str(i) + "])" + + ("," if i < n - 1 else ")") + for i in range(n) + ) + return ( + _TRGEO_LICENSE + "\n\n" + f"#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n\n" + "namespace NES\n{\n\n" + f"{nebula_name}LogicalFunction::{nebula_name}LogicalFunction({ctor})\n" + f" : dataType(DataTypeProvider::provideDataType(DataType::Type::{ret}))\n" + "{\n" + f" parameters.reserve({n});\n" + f"{pushes}\n" + "}\n" + f"DataType {nebula_name}LogicalFunction::getDataType() const {{ return dataType; }}\n" + f"LogicalFunction {nebula_name}LogicalFunction::withDataType(const DataType& d) const {{ auto c=*this; c.dataType=d; return c; }}\n" + f"std::vector {nebula_name}LogicalFunction::getChildren() const {{ return parameters; }}\n" + f"LogicalFunction {nebula_name}LogicalFunction::withChildren(const std::vector& children) const {{\n" + f" PRECONDITION(children.size()=={n},\"{nebula_name}LogicalFunction requires {n} children, but got {{}}\",children.size());\n" + f" auto c=*this; c.parameters=children; return c;\n" + "}\n" + f"std::string_view {nebula_name}LogicalFunction::getType() const {{ return NAME; }}\n" + f"bool {nebula_name}LogicalFunction::operator==(const LogicalFunctionConcept& rhs) const {{\n" + f" if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters;\n" + " return false;\n" + "}\n" + f"std::string {nebula_name}LogicalFunction::explain(ExplainVerbosity v) const {{\n" + " return fmt::format(\"{}({})\",NAME,parameters[0].explain(v));\n" + "}\n" + f"LogicalFunction {nebula_name}LogicalFunction::withInferredDataType(const Schema& schema) const {{\n" + f" std::vector c; c.reserve({n});\n" + " for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema));\n" + f"{inv}\n" + " return withChildren(c);\n" + "}\n" + f"SerializableFunction {nebula_name}LogicalFunction::serialize() const {{\n" + " SerializableFunction proto;\n" + " proto.set_function_type(std::string(NAME));\n" + " DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type());\n" + " for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize());\n" + " return proto;\n" + "}\n" + f"LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::Register{nebula_name}LogicalFunction(\n" + " LogicalFunctionRegistryArguments arguments)\n" + "{\n" + f" PRECONDITION(arguments.children.size()=={n},\n" + f" \"{nebula_name}LogicalFunction requires {n} children but got {{}}\",\n" + " arguments.children.size());\n" + f" return {nebula_name}LogicalFunction(\n" + f"{reg_args};\n" + "}\n\n" + "} // namespace NES\n" + ) + + +def _trgeo_logical_cpp_nad(nebula_name, ctor_args, invariants, ret="FLOAT64"): + n = len(ctor_args) + ctor = ", ".join(f"LogicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" parameters.push_back(std::move({a}));" for a in ctor_args) + inv = "\n".join( + f" INVARIANT(c[{i}].getDataType().isType(DataType::Type::{t}), \"{nm} must be {t}\");" + for i, t, nm in invariants + ) + reg_args = "\n".join( + " std::move(arguments.children[" + str(i) + "])" + + ("," if i < n - 1 else ")") + for i in range(n) + ) + return ( + _TRGEO_LICENSE + "\n\n" + f"#include \n\n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n" + "#include \n\n" + "namespace NES\n{\n\n" + f"{nebula_name}LogicalFunction::{nebula_name}LogicalFunction({ctor})\n" + f" : dataType(DataTypeProvider::provideDataType(DataType::Type::{ret}))\n" + "{\n" + f" parameters.reserve({n});\n" + f"{pushes}\n" + "}\n\n" + f"DataType {nebula_name}LogicalFunction::getDataType() const {{ return dataType; }}\n\n" + f"LogicalFunction {nebula_name}LogicalFunction::withDataType(const DataType& newDataType) const\n" + "{\n" + " auto copy = *this; copy.dataType = newDataType; return copy;\n" + "}\n\n" + f"std::vector {nebula_name}LogicalFunction::getChildren() const {{ return parameters; }}\n\n" + f"LogicalFunction {nebula_name}LogicalFunction::withChildren(const std::vector& children) const\n" + "{\n" + f" PRECONDITION(children.size() == {n},\n" + f" \"{nebula_name}LogicalFunction requires {n} children, but got {{}}\", children.size());\n" + " auto copy = *this; copy.parameters = children; return copy;\n" + "}\n\n" + f"std::string_view {nebula_name}LogicalFunction::getType() const {{ return NAME; }}\n\n" + f"bool {nebula_name}LogicalFunction::operator==(const LogicalFunctionConcept& rhs) const\n" + "{\n" + f" if (const auto* other = dynamic_cast(&rhs))\n" + " return parameters == other->parameters;\n" + " return false;\n" + "}\n\n" + f"std::string {nebula_name}LogicalFunction::explain(ExplainVerbosity verbosity) const\n" + "{\n" + " return fmt::format(\"{}({})\", NAME, parameters[0].explain(verbosity));\n" + "}\n\n" + f"LogicalFunction {nebula_name}LogicalFunction::withInferredDataType(const Schema& schema) const\n" + "{\n" + f" std::vector c;\n" + f" c.reserve({n});\n" + " for (const auto& p : parameters)\n" + " c.emplace_back(p.withInferredDataType(schema));\n" + f"{inv}\n" + " return withChildren(c);\n" + "}\n\n" + f"SerializableFunction {nebula_name}LogicalFunction::serialize() const\n" + "{\n" + " SerializableFunction proto;\n" + " proto.set_function_type(std::string(NAME));\n" + " DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type());\n" + " for (const auto& child : parameters)\n" + " proto.add_children()->CopyFrom(child.serialize());\n" + " return proto;\n" + "}\n\n" + f"LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::Register{nebula_name}LogicalFunction(\n" + " LogicalFunctionRegistryArguments arguments)\n" + "{\n" + f" PRECONDITION(arguments.children.size() == {n},\n" + f" \"{nebula_name}LogicalFunction requires {n} children but got {{}}\",\n" + " arguments.children.size());\n" + f" return {nebula_name}LogicalFunction(\n" + f"{reg_args};\n" + "}\n\n" + "} // namespace NES\n" + ) + + +# ---------- Physical HPP ----------------------------------------------- + +def _trgeo_physical_hpp(nebula_name, ctor_args): + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + return ( + _TRGEO_LICENSE + "\n\n" + "#pragma once\n\n" + "#include \n" + "#include \n" + "#include \n" + "#include \n\n" + "namespace NES {\n\n" + f"class {nebula_name}PhysicalFunction : public PhysicalFunctionConcept {{\n" + "public:\n" + f" {nebula_name}PhysicalFunction({ctor});\n" + " VarVal execute(const Record& record, ArenaRef& arena) const override;\n" + "private:\n" + " std::vector paramFns;\n" + "};\n\n" + "} // namespace NES\n" + ) + + +# ---------- Physical CPP builders -------------------------------------- +# Each returns a complete file string for a specific layout. + +def _trgeo_phys_cpp_trgeometry_geo(nebula_name, meos_call, ctor_args): + """Layout A: trgeometry_geo — VariableSizedData cast, trgeometryinst_make, compact registrar.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor}) {{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const {{\n" + + " auto ref_wkt = paramFns[0].execute(record, arena).cast();\n" + + " auto x1 = paramFns[1].execute(record, arena).cast();\n" + + " auto y1 = paramFns[2].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[3].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[4].execute(record, arena).cast();\n" + + " auto tgt_wkt = paramFns[5].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref1_str = (char*)malloc(ref_wktsz + 1);\n" + + " memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\\0';\n" + + " GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str);\n" + + " if (!gref1) return 0.0;\n" + + " Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!pose1) { free(gref1); return 0.0; }\n" + + " TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1);\n" + + " free(gref1); free(pose1);\n" + + " if (!inst1) return 0.0;\n" + + " char* tgt_str = (char*)malloc(tgt_wktsz + 1);\n" + + " memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\\0';\n" + + " GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str);\n" + + " if (!gs_tgt) { free(inst1); return 0.0; }\n" + + f" int r = {meos_call}((Temporal*)inst1, gs_tgt);\n" + + " free(inst1); free(gs_tgt);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref_wkt, x1, y1, theta1, ts1, tgt_wkt);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_compact(nebula_name, n) + ) + + +def _trgeo_phys_cpp_trgeometry_geo_nad(nebula_name, meos_call, ctor_args): + """Layout B: trgeometry_geo nad-style — no VariableSizedData cast, trgeoinst_make, nad registrar.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_NO_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor})\n" + + "{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const\n" + + "{\n" + + " auto ref_wkt = paramFns[0].execute(record, arena);\n" + + " auto x = paramFns[1].execute(record, arena).cast();\n" + + " auto y = paramFns[2].execute(record, arena).cast();\n" + + " auto theta = paramFns[3].execute(record, arena).cast();\n" + + " auto ts = paramFns[4].execute(record, arena).cast();\n" + + " auto tgt_wkt = paramFns[5].execute(record, arena);\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref_str = (char*)malloc(ref_len + 1);\n" + + " memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\\0';\n" + + " GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str);\n" + + " if (!gs_ref) return 0.0;\n" + + " Pose* pose = pose_make_2d(x, y, theta, false, 0);\n" + + " if (!pose) { free(gs_ref); return 0.0; }\n" + + " TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts);\n" + + " free(gs_ref); free(pose);\n" + + " if (!inst) return 0.0;\n" + + " char* tgt_str = (char*)malloc(tgt_len + 1);\n" + + " memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\\0';\n" + + " GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str);\n" + + " if (!gs_tgt) { free(inst); return 0.0; }\n" + + f" int r = {meos_call}((Temporal*)inst, gs_tgt);\n" + + " free(inst); free(gs_tgt);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref_wkt, x, y, theta, ts, tgt_wkt);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_nad(nebula_name, n) + ) + + +def _trgeo_phys_cpp_geo_trgeometry(nebula_name, meos_call, ctor_args): + """Layout C: geo_trgeometry — VariableSizedData cast, trgeometryinst_make, geo-first MEOS call.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor}) {{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const {{\n" + + " auto tgt_wkt = paramFns[0].execute(record, arena).cast();\n" + + " auto ref_wkt = paramFns[1].execute(record, arena).cast();\n" + + " auto x1 = paramFns[2].execute(record, arena).cast();\n" + + " auto y1 = paramFns[3].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[4].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[5].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* tgt_wkt, uint32_t tgt_wktsz, const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref1_str = (char*)malloc(ref_wktsz + 1);\n" + + " memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\\0';\n" + + " GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str);\n" + + " if (!gref1) return 0.0;\n" + + " Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!pose1) { free(gref1); return 0.0; }\n" + + " TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1);\n" + + " free(gref1); free(pose1);\n" + + " if (!inst1) return 0.0;\n" + + " char* tgt_str = (char*)malloc(tgt_wktsz + 1);\n" + + " memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\\0';\n" + + " GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str);\n" + + " if (!gs_tgt) { free(inst1); return 0.0; }\n" + + f" int r = {meos_call}(gs_tgt, (Temporal*)inst1);\n" + + " free(inst1); free(gs_tgt);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " tgt_wkt, ref_wkt, x1, y1, theta1, ts1);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_compact(nebula_name, n) + ) + + +def _trgeo_phys_cpp_geo_trgeometry_eq(nebula_name, meos_call, ctor_args): + """Layout D: geo_trgeometry eq-style — trgeoinst_make, gs_tgt-first build order, nad registrar.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_NO_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor})\n" + + "{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const\n" + + "{\n" + + " auto tgt_wkt = paramFns[0].execute(record, arena);\n" + + " auto ref_wkt = paramFns[1].execute(record, arena);\n" + + " auto x = paramFns[2].execute(record, arena).cast();\n" + + " auto y = paramFns[3].execute(record, arena).cast();\n" + + " auto theta = paramFns[4].execute(record, arena).cast();\n" + + " auto ts = paramFns[5].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* tgt_wkt, uint32_t tgt_len, const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* tgt_str = (char*)malloc(tgt_len + 1);\n" + + " memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\\0';\n" + + " GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str);\n" + + " if (!gs_tgt) return 0.0;\n" + + " char* ref_str = (char*)malloc(ref_len + 1);\n" + + " memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\\0';\n" + + " GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str);\n" + + " if (!gs_ref) { free(gs_tgt); return 0.0; }\n" + + " Pose* pose = pose_make_2d(x, y, theta, false, 0);\n" + + " if (!pose) { free(gs_tgt); free(gs_ref); return 0.0; }\n" + + " TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts);\n" + + " free(gs_ref); free(pose);\n" + + " if (!inst) { free(gs_tgt); return 0.0; }\n" + + f" int r = {meos_call}(gs_tgt, (Temporal*)inst);\n" + + " free(gs_tgt); free(inst);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " tgt_wkt, ref_wkt, x, y, theta, ts);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_nad(nebula_name, n) + ) + + +def _trgeo_phys_cpp_trgeometry_geo_with_dist(nebula_name, meos_call, ctor_args): + """Layout E: trgeometry_geo_with_dist — 7 args, dist as 3rd MEOS arg.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor}) {{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const {{\n" + + " auto ref_wkt = paramFns[0].execute(record, arena).cast();\n" + + " auto x1 = paramFns[1].execute(record, arena).cast();\n" + + " auto y1 = paramFns[2].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[3].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[4].execute(record, arena).cast();\n" + + " auto tgt_wkt = paramFns[5].execute(record, arena).cast();\n" + + " auto dist = paramFns[6].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz, double dist) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref1_str = (char*)malloc(ref_wktsz + 1);\n" + + " memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\\0';\n" + + " GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str);\n" + + " if (!gref1) return 0.0;\n" + + " Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!pose1) { free(gref1); return 0.0; }\n" + + " TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1);\n" + + " free(gref1); free(pose1);\n" + + " if (!inst1) return 0.0;\n" + + " char* tgt_str = (char*)malloc(tgt_wktsz + 1);\n" + + " memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\\0';\n" + + " GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str);\n" + + " if (!gs_tgt) { free(inst1); return 0.0; }\n" + + f" int r = {meos_call}((Temporal*)inst1, gs_tgt, dist);\n" + + " free(inst1); free(gs_tgt);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref_wkt, x1, y1, theta1, ts1, tgt_wkt, dist);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_compact(nebula_name, n) + ) + + +def _trgeo_phys_cpp_trgeometry_trgeometry(nebula_name, meos_call, ctor_args): + """Layout F: trgeometry_trgeometry — 10 args, VariableSizedData cast, trgeometryinst_make.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor}) {{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const {{\n" + + " auto ref1_wkt = paramFns[0].execute(record, arena).cast();\n" + + " auto x1 = paramFns[1].execute(record, arena).cast();\n" + + " auto y1 = paramFns[2].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[3].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[4].execute(record, arena).cast();\n" + + " auto ref2_wkt = paramFns[5].execute(record, arena).cast();\n" + + " auto x2 = paramFns[6].execute(record, arena).cast();\n" + + " auto y2 = paramFns[7].execute(record, arena).cast();\n" + + " auto theta2 = paramFns[8].execute(record, arena).cast();\n" + + " auto ts2 = paramFns[9].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref1_str = (char*)malloc(ref1_wktsz + 1);\n" + + " memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\\0';\n" + + " GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str);\n" + + " if (!gref1) return 0.0;\n" + + " Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!pose1) { free(gref1); return 0.0; }\n" + + " TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1);\n" + + " free(gref1); free(pose1);\n" + + " if (!inst1) return 0.0;\n" + + " char* ref2_str = (char*)malloc(ref2_wktsz + 1);\n" + + " memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\\0';\n" + + " GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str);\n" + + " if (!gref2) return 0.0;\n" + + " Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0);\n" + + " if (!pose2) { free(gref2); return 0.0; }\n" + + " TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2);\n" + + " free(gref2); free(pose2);\n" + + " if (!inst2) { free(inst1); return 0.0; }\n" + + f" int r = {meos_call}((Temporal*)inst1, (Temporal*)inst2);\n" + + " free(inst1); free(inst2);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_compact(nebula_name, n) + ) + + +def _trgeo_phys_cpp_trgeometry_trgeometry_nad(nebula_name, meos_call, ctor_args): + """Layout G: trgeometry_trgeometry nad-style — trgeoinst_make, no cast, nad registrar.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_NO_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor})\n" + + "{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const\n" + + "{\n" + + " auto ref1_wkt = paramFns[0].execute(record, arena);\n" + + " auto x1 = paramFns[1].execute(record, arena).cast();\n" + + " auto y1 = paramFns[2].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[3].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[4].execute(record, arena).cast();\n" + + " auto ref2_wkt = paramFns[5].execute(record, arena);\n" + + " auto x2 = paramFns[6].execute(record, arena).cast();\n" + + " auto y2 = paramFns[7].execute(record, arena).cast();\n" + + " auto theta2 = paramFns[8].execute(record, arena).cast();\n" + + " auto ts2 = paramFns[9].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* s1 = (char*)malloc(ref1_len + 1);\n" + + " memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\\0';\n" + + " GSERIALIZED* gs1 = geom_in(s1, -1); free(s1);\n" + + " if (!gs1) return 0.0;\n" + + " Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!p1) { free(gs1); return 0.0; }\n" + + " TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1);\n" + + " free(gs1); free(p1);\n" + + " if (!inst1) return 0.0;\n" + + " char* s2 = (char*)malloc(ref2_len + 1);\n" + + " memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\\0';\n" + + " GSERIALIZED* gs2 = geom_in(s2, -1); free(s2);\n" + + " if (!gs2) { free(inst1); return 0.0; }\n" + + " Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0);\n" + + " if (!p2) { free(inst1); free(gs2); return 0.0; }\n" + + " TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2);\n" + + " free(gs2); free(p2);\n" + + " if (!inst2) { free(inst1); return 0.0; }\n" + + f" int r = {meos_call}((Temporal*)inst1, (Temporal*)inst2);\n" + + " free(inst1); free(inst2);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_nad(nebula_name, n) + ) + + +def _trgeo_phys_cpp_trgeometry_trgeometry_with_dist(nebula_name, meos_call, ctor_args): + """Layout H: trgeometry_trgeometry_with_dist — 11 args, trgeometryinst_make.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor}) {{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const {{\n" + + " auto ref1_wkt = paramFns[0].execute(record, arena).cast();\n" + + " auto x1 = paramFns[1].execute(record, arena).cast();\n" + + " auto y1 = paramFns[2].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[3].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[4].execute(record, arena).cast();\n" + + " auto ref2_wkt = paramFns[5].execute(record, arena).cast();\n" + + " auto x2 = paramFns[6].execute(record, arena).cast();\n" + + " auto y2 = paramFns[7].execute(record, arena).cast();\n" + + " auto theta2 = paramFns[8].execute(record, arena).cast();\n" + + " auto ts2 = paramFns[9].execute(record, arena).cast();\n" + + " auto dist = paramFns[10].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2, double dist) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref1_str = (char*)malloc(ref1_wktsz + 1);\n" + + " memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\\0';\n" + + " GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str);\n" + + " if (!gref1) return 0.0;\n" + + " Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!pose1) { free(gref1); return 0.0; }\n" + + " TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1);\n" + + " free(gref1); free(pose1);\n" + + " if (!inst1) return 0.0;\n" + + " char* ref2_str = (char*)malloc(ref2_wktsz + 1);\n" + + " memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\\0';\n" + + " GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str);\n" + + " if (!gref2) return 0.0;\n" + + " Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0);\n" + + " if (!pose2) { free(gref2); return 0.0; }\n" + + " TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2);\n" + + " free(gref2); free(pose2);\n" + + " if (!inst2) { free(inst1); return 0.0; }\n" + + f" int r = {meos_call}((Temporal*)inst1, (Temporal*)inst2, dist);\n" + + " free(inst1); free(inst2);\n" + + " return r > 0 ? 1.0 : 0.0;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2, dist);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_compact(nebula_name, n) + ) + + +def _trgeo_phys_cpp_nad_trgeometry_geo(nebula_name, meos_call, ctor_args): + """Layout I: nad_trgeometry_geo — double return, trgeoinst_make, nad registrar.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_NO_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor})\n" + + "{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const\n" + + "{\n" + + " auto ref_wkt = paramFns[0].execute(record, arena);\n" + + " auto x = paramFns[1].execute(record, arena).cast();\n" + + " auto y = paramFns[2].execute(record, arena).cast();\n" + + " auto theta = paramFns[3].execute(record, arena).cast();\n" + + " auto ts = paramFns[4].execute(record, arena).cast();\n" + + " auto tgt_wkt = paramFns[5].execute(record, arena);\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* ref_str = (char*)malloc(ref_len + 1);\n" + + " memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\\0';\n" + + " GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str);\n" + + " if (!gs_ref) return 0.0;\n" + + " Pose* pose = pose_make_2d(x, y, theta, false, 0);\n" + + " if (!pose) { free(gs_ref); return 0.0; }\n" + + " TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts);\n" + + " free(gs_ref); free(pose);\n" + + " if (!inst) return 0.0;\n" + + " char* tgt_str = (char*)malloc(tgt_len + 1);\n" + + " memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\\0';\n" + + " GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str);\n" + + " if (!gs_tgt) { free(inst); return 0.0; }\n" + + f" double r = {meos_call}((Temporal*)inst, gs_tgt);\n" + + " free(inst); free(gs_tgt);\n" + + " return r;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref_wkt, x, y, theta, ts, tgt_wkt);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_nad(nebula_name, n) + ) + + +def _trgeo_phys_cpp_nad_trgeometry_trgeometry(nebula_name, meos_call, ctor_args): + """Layout J: nad_trgeometry_trgeometry — 10 args, double return, trgeoinst_make.""" + n = len(ctor_args) + ctor = ", ".join(f"PhysicalFunction {a}" for a in ctor_args) + pushes = "\n".join(f" paramFns.push_back(std::move({a}));" for a in ctor_args) + return ( + _trgeo_phys_header(nebula_name, _TRGEO_PHYS_INCLUDES_NO_VS) + + f"{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor})\n" + + "{\n" + + f" paramFns.reserve({n});\n" + + pushes + "\n}\n\n" + + f"VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const\n" + + "{\n" + + " auto ref1_wkt = paramFns[0].execute(record, arena);\n" + + " auto x1 = paramFns[1].execute(record, arena).cast();\n" + + " auto y1 = paramFns[2].execute(record, arena).cast();\n" + + " auto theta1 = paramFns[3].execute(record, arena).cast();\n" + + " auto ts1 = paramFns[4].execute(record, arena).cast();\n" + + " auto ref2_wkt = paramFns[5].execute(record, arena);\n" + + " auto x2 = paramFns[6].execute(record, arena).cast();\n" + + " auto y2 = paramFns[7].execute(record, arena).cast();\n" + + " auto theta2 = paramFns[8].execute(record, arena).cast();\n" + + " auto ts2 = paramFns[9].execute(record, arena).cast();\n" + + " const auto result = nautilus::invoke(\n" + + " +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double {\n" + + " try {\n" + + " MEOS::Meos::ensureMeosInitialized();\n" + + " char* s1 = (char*)malloc(ref1_len + 1);\n" + + " memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\\0';\n" + + " GSERIALIZED* gs1 = geom_in(s1, -1); free(s1);\n" + + " if (!gs1) return 0.0;\n" + + " Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0);\n" + + " if (!p1) { free(gs1); return 0.0; }\n" + + " TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1);\n" + + " free(gs1); free(p1);\n" + + " if (!inst1) return 0.0;\n" + + " char* s2 = (char*)malloc(ref2_len + 1);\n" + + " memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\\0';\n" + + " GSERIALIZED* gs2 = geom_in(s2, -1); free(s2);\n" + + " if (!gs2) { free(inst1); return 0.0; }\n" + + " Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0);\n" + + " if (!p2) { free(inst1); free(gs2); return 0.0; }\n" + + " TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2);\n" + + " free(gs2); free(p2);\n" + + " if (!inst2) { free(inst1); return 0.0; }\n" + + f" double r = {meos_call}((Temporal*)inst1, (Temporal*)inst2);\n" + + " free(inst1); free(inst2);\n" + + " return r;\n" + + " } catch (const std::exception&) { return 0.0; }\n" + + " },\n" + + " ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2);\n" + + " return VarVal(result);\n" + + "}\n" + + _trgeo_reg_nad(nebula_name, n) + ) + + +# Invariant sets used by build_descriptor.py classifiers (exported here so +# emit_trgeometry_operator can reference them by name). +_INV_TRG_GEO_X1 = [(0,"VARSIZED","ref_wkt"),(1,"FLOAT64","x1"),(2,"FLOAT64","y1"),(3,"FLOAT64","theta1"),(4,"UINT64","ts1"),(5,"VARSIZED","tgt_wkt")] +_INV_TRG_GEO_X = [(0,"VARSIZED","ref_wkt"),(1,"FLOAT64","x"),(2,"FLOAT64","y"),(3,"FLOAT64","theta"),(4,"UINT64","ts"),(5,"VARSIZED","tgt_wkt")] +_INV_GEO_TRG_X1 = [(0,"VARSIZED","tgt_wkt"),(1,"VARSIZED","ref_wkt"),(2,"FLOAT64","x1"),(3,"FLOAT64","y1"),(4,"FLOAT64","theta1"),(5,"UINT64","ts1")] +_INV_GEO_TRG_X = [(0,"VARSIZED","tgt_wkt"),(1,"VARSIZED","ref_wkt"),(2,"FLOAT64","x"),(3,"FLOAT64","y"),(4,"FLOAT64","theta"),(5,"UINT64","ts")] +_INV_TRG_GEO_DIST = _INV_TRG_GEO_X1 + [(6,"FLOAT64","dist")] +_INV_TRG_TRG_X1 = [(0,"VARSIZED","ref1_wkt"),(1,"FLOAT64","x1"),(2,"FLOAT64","y1"),(3,"FLOAT64","theta1"),(4,"UINT64","ts1"),(5,"VARSIZED","ref2_wkt"),(6,"FLOAT64","x2"),(7,"FLOAT64","y2"),(8,"FLOAT64","theta2"),(9,"UINT64","ts2")] +_INV_TRG_TRG_DIST = _INV_TRG_TRG_X1 + [(10,"FLOAT64","dist")] + +_TRGEO_PHYS_DISPATCH = { + "build_trgeometry_geo": (_trgeo_phys_cpp_trgeometry_geo, ["ref_wkt","x1","y1","theta1","ts1","tgt_wkt"], _INV_TRG_GEO_X1, "compact"), + "build_trgeometry_geo_nad": (_trgeo_phys_cpp_trgeometry_geo_nad, ["ref_wkt","x","y","theta","ts","tgt_wkt"], _INV_TRG_GEO_X, "nad"), + "build_geo_trgeometry": (_trgeo_phys_cpp_geo_trgeometry, ["tgt_wkt","ref_wkt","x1","y1","theta1","ts1"], _INV_GEO_TRG_X1, "compact"), + "build_geo_trgeometry_eq": (_trgeo_phys_cpp_geo_trgeometry_eq, ["tgt_wkt","ref_wkt","x","y","theta","ts"], _INV_GEO_TRG_X, "nad"), + "build_trgeometry_geo_with_dist": (_trgeo_phys_cpp_trgeometry_geo_with_dist, ["ref_wkt","x1","y1","theta1","ts1","tgt_wkt","dist"], _INV_TRG_GEO_DIST,"compact"), + "build_trgeometry_trgeometry": (_trgeo_phys_cpp_trgeometry_trgeometry, ["ref1_wkt","x1","y1","theta1","ts1","ref2_wkt","x2","y2","theta2","ts2"], _INV_TRG_TRG_X1, "compact"), + "build_trgeometry_trgeometry_nad": (_trgeo_phys_cpp_trgeometry_trgeometry_nad, ["ref1_wkt","x1","y1","theta1","ts1","ref2_wkt","x2","y2","theta2","ts2"], _INV_TRG_TRG_X1, "nad"), + "build_trgeometry_trgeometry_with_dist": (_trgeo_phys_cpp_trgeometry_trgeometry_with_dist,["ref1_wkt","x1","y1","theta1","ts1","ref2_wkt","x2","y2","theta2","ts2","dist"], _INV_TRG_TRG_DIST,"compact"), + "build_nad_trgeometry_geo": (_trgeo_phys_cpp_nad_trgeometry_geo, ["ref_wkt","x","y","theta","ts","tgt_wkt"], _INV_TRG_GEO_X, "nad"), + "build_nad_trgeometry_trgeometry": (_trgeo_phys_cpp_nad_trgeometry_trgeometry, ["ref1_wkt","x1","y1","theta1","ts1","ref2_wkt","x2","y2","theta2","ts2"], _INV_TRG_TRG_X1, "nad"), +} + + +def emit_trgeometry_operator(op, output_root: Path): + """Emit 4 files for a trgeometry operator using the W148/W149 templates. + + op must have: nebula_name, meos_call, comment_one_liner, and one of the + build_* keys from _TRGEO_PHYS_DISPATCH set to True. + """ + nebula_name = op["nebula_name"] + meos_call = op["meos_call"] + brief = op.get("comment_one_liner", f"MEOS {meos_call} over a trgeometry instant.") + + build_key = next((k for k in _TRGEO_PHYS_DISPATCH if op.get(k)), None) + if build_key is None: + sys.stderr.write(f" ! {nebula_name}: no trgeometry build key found\n") + return + + phys_fn, ctor_args, invariants, log_style = _TRGEO_PHYS_DISPATCH[build_key] + + logical_hpp_path = output_root / "nes-logical-operators/include/Functions/Meos" / f"{nebula_name}LogicalFunction.hpp" + logical_cpp_path = output_root / "nes-logical-operators/src/Functions/Meos" / f"{nebula_name}LogicalFunction.cpp" + physical_hpp_path = output_root / "nes-physical-operators/include/Functions/Meos" / f"{nebula_name}PhysicalFunction.hpp" + physical_cpp_path = output_root / "nes-physical-operators/src/Functions/Meos" / f"{nebula_name}PhysicalFunction.cpp" + + for p in (logical_hpp_path, logical_cpp_path, physical_hpp_path, physical_cpp_path): + p.parent.mkdir(parents=True, exist_ok=True) + + if log_style == "nad": + logical_hpp_path.write_text(_trgeo_logical_hpp_nad(nebula_name, brief, ctor_args)) + logical_cpp_path.write_text(_trgeo_logical_cpp_nad(nebula_name, ctor_args, invariants)) + else: + logical_hpp_path.write_text(_trgeo_logical_hpp_compact(nebula_name, brief, ctor_args)) + logical_cpp_path.write_text(_trgeo_logical_cpp_compact(nebula_name, ctor_args, invariants)) + + physical_hpp_path.write_text(_trgeo_physical_hpp(nebula_name, ctor_args)) + physical_cpp_path.write_text(phys_fn(nebula_name, meos_call, ctor_args)) + + sys.stderr.write(f" ✓ {nebula_name} [trgeometry/{build_key}]: emitted 4 files\n") + + +def cpp_logical_type(arg): + """C++ constructor-arg type for a LogicalFunction parameter.""" + return "LogicalFunction" + + +def cpp_physical_type(arg): + """C++ constructor-arg type for a PhysicalFunction parameter.""" + return "PhysicalFunction" + + +def build_ctor_args(args, type_fn): + return ",\n ".join( + f"{type_fn(a)} {a['name']}" for a in args + ) + + +def build_pushes_logical(args): + return "\n".join(f" parameters.push_back(std::move({a['name']}));" for a in args) + + +def build_pushes_physical(args): + return "\n".join( + f" parameterFunctions.push_back(std::move({a['name']}Function));" for a in args + ) + + +def build_registrar_pushes_logical(args, nebula_name): + pushes = [] + for i, _ in enumerate(args): + pushes.append(f" auto arg{i} = std::move(arguments.children[{i}]);") + pushes.append( + f" return {nebula_name}LogicalFunction(" + ", ".join(f"std::move(arg{i})" for i in range(len(args))) + ");" + ) + return "\n".join(pushes) + + +def build_registrar_pushes_physical(args, nebula_name): + pushes = [] + for i, _ in enumerate(args): + # PhysicalFunctionRegistryArguments uses `childFunctions`, not `children` + # (LogicalFunctionRegistryArguments uses `children` — see registry headers). + pushes.append(f" auto arg{i} = std::move(arguments.childFunctions[{i}]);") + pushes.append( + f" return {nebula_name}PhysicalFunction(" + ", ".join(f"std::move(arg{i})" for i in range(len(args))) + ");" + ) + return "\n".join(pushes) + + +def generic_fields(op): + """The ordered (name, cpp) event fields for a 'generic' operator: + the input type's fields followed by one (or more) per extra arg (reversed for scalar_first). + New multi-field extra_arg kinds expand to their constituent fields here so the + logical HPP / physical HPP ctor signatures match the physical CPP.""" + _SCALAR_KINDS = {"scalar", "bigint_scalar", "bool_scalar", "int_scalar"} + # primary_fields on a static_scalar op overrides the (empty) inp["fields"]. + pf = op.get("primary_fields") + if pf and op.get("input_type") == "static_scalar": + return [(str(n), str(t)) for n, t in pf] + inp_fields = list(GENERIC_INPUTS[op["input_type"]]["fields"]) + extra_fields = [] + for i, ex in enumerate(op.get("extra_args", [])): + kind = ex["kind"] + if kind in _SCALAR_KINDS: + cpp = ex.get("cpp", "double") + extra_fields.append((f"arg{i}", cpp)) + elif kind in ("h3index", "quadbin", "uint64_scalar", "th3index_scalar"): + extra_fields.append((f"arg{i}", "uint64_t")) + elif kind == "npoint": + extra_fields.append((f"rid{i}", "uint64_t")) + extra_fields.append((f"frac{i}", "double")) + elif kind == "pose": + extra_fields.append((f"px{i}", "double")) + extra_fields.append((f"py{i}", "double")) + extra_fields.append((f"ptheta{i}", "double")) + elif kind == "text_varsized": + extra_fields.append((f"arg{i}", "VariableSizedData")) + elif kind == "jsonb_varsized": + extra_fields.append((f"arg{i}", "VariableSizedData")) + elif kind == "tjsonb": + extra_fields.append((f"json{i}", "VariableSizedData")) + extra_fields.append((f"ts{i}", "uint64_t")) + elif kind == "ttext": + extra_fields.append((f"tval{i}", "VariableSizedData")) + extra_fields.append((f"ts{i}", "uint64_t")) + elif kind == "th3index": + extra_fields.append((f"cell{i}", "uint64_t")) + extra_fields.append((f"ts{i}", "uint64_t")) + elif kind == "tquadbin": + extra_fields.append((f"cell{i}", "uint64_t")) + extra_fields.append((f"ts{i}", "uint64_t")) + elif kind == "tnpoint": + extra_fields.append((f"rid{i}", "uint64_t")) + extra_fields.append((f"frac{i}", "double")) + extra_fields.append((f"ts{i}", "uint64_t")) + elif kind == "tpose": + extra_fields.append((f"px{i}", "double")) + extra_fields.append((f"py{i}", "double")) + extra_fields.append((f"ptheta{i}", "double")) + extra_fields.append((f"ts{i}", "uint64_t")) + elif kind in ("geom_wkt", "geog_wkt"): + # Second geometry arg as VARSIZED WKT + extra_fields.append((f"arg{i}", "VariableSizedData")) + else: + # Fallback for geom, box, wkb_temporal: single VARSIZED field + extra_fields.append((f"arg{i}", "VariableSizedData")) + if op.get("scalar_first"): + return extra_fields + inp_fields + return inp_fields + extra_fields + + +def emit_operator(op, output_root: Path): + nebula_name = op["nebula_name"] + # Trgeometry operators use dedicated per-layout builders (W148/W149 wave). + # Detected by any of the 10 trgeometry build keys registered in _TRGEO_PHYS_DISPATCH. + if any(op.get(k) for k in _TRGEO_PHYS_DISPATCH): + emit_trgeometry_operator(op, output_root) + return + if op.get("build_generic"): + # Derive the canonical arg list + return metadata so the shared logical + # and physical-hpp templates match the assembled physical .cpp. + op["args"] = [{"name": n, "nautilus_type": c, "cpp_type": c} for n, c in generic_fields(op)] + rt, nr = GENERIC_RETURNS[op["return_kind"]][:2] + op.setdefault("return_type", rt) + op.setdefault("nautilus_return", nr) + n_args = len(op["args"]) + + # Logical .hpp constructor args (LogicalFunction type each) + ctor_logical_args = build_ctor_args(op["args"], cpp_logical_type) + # Physical .hpp / .cpp constructor args use 'XxxFunction' naming convention. + # If the op descriptor specifies ctor_sep_indent, use that many spaces for the + # continuation indent (to match the committed file's alignment style); otherwise + # fall back to the legacy fixed 58-space separator used by other shapes. + physical_args = [{"name": a["name"] + "Function"} for a in op["args"]] + _phys_sep_indent = op.get("ctor_sep_indent", 58) + _phys_sep = ",\n" + " " * _phys_sep_indent + ctor_physical_args = _phys_sep.join( + f"PhysicalFunction {a['name']}" for a in physical_args + ) + + ctor_logical_pushes = build_pushes_logical(op["args"]) + ctor_physical_pushes = build_pushes_physical(op["args"]) + registrar_l = build_registrar_pushes_logical(op["args"], nebula_name) + registrar_p = build_registrar_pushes_physical(op["args"], nebula_name) + + common = { + "nebula_name": nebula_name, + "comment_one_liner": op["comment_one_liner"], + "meos_call": op["meos_call"], + "n_args": n_args, + "nautilus_return": op["nautilus_return"], + "return_type": op["return_type"], + "zero_return": {"bool": "false", "int": "0", "double": "0.0"}.get(op.get("return_type", "int"), "0"), + "ctor_logical_args": ctor_logical_args, + "ctor_physical_args": ctor_physical_args, + "ctor_logical_pushes": ctor_logical_pushes, + "ctor_physical_pushes": ctor_physical_pushes, + "registrar_pushes": registrar_l, + # tnumber-shape extras (only consumed by the tnumber templates). + # tnumber_wkt_format is a fmt::format pattern that ends up in C++ as-is; + # Python single-pass .format() means we want raw `{}@{}` here (no doubling). + "tnumber_value_cpp_type": op.get("tnumber_value_cpp_type", "double"), + "scalar_cpp_type": op.get("scalar_cpp_type", "double"), + "tnumber_wkt_format": op.get("tnumber_wkt_format", "{}@{}"), + "tnumber_in_fn": op.get("tnumber_in_fn", "tfloat_in"), + # Cast expressions for tint operators: double-typed lambda args are cast to int + # before being passed to fmt::format or the MEOS call (matches committed style). + # For tfloat operators these are just the bare variable names (no cast). + "value_fmt_expr": op.get("value_fmt_expr", "value"), + "threshold_call_expr": op.get("threshold_call_expr", "threshold"), + "scalar_call_expr": op.get("scalar_call_expr", "d"), + "value1_fmt_expr": op.get("value1_fmt_expr", "v1"), + "value2_fmt_expr": op.get("value2_fmt_expr", "v2"), + } + + logical_hpp_path = output_root / "nes-logical-operators/include/Functions/Meos" / f"{nebula_name}LogicalFunction.hpp" + logical_cpp_path = output_root / "nes-logical-operators/src/Functions/Meos" / f"{nebula_name}LogicalFunction.cpp" + physical_hpp_path = output_root / "nes-physical-operators/include/Functions/Meos" / f"{nebula_name}PhysicalFunction.hpp" + physical_cpp_path = output_root / "nes-physical-operators/src/Functions/Meos" / f"{nebula_name}PhysicalFunction.cpp" + + for p in (logical_hpp_path, logical_cpp_path, physical_hpp_path, physical_cpp_path): + p.parent.mkdir(parents=True, exist_ok=True) + + logical_hpp_path.write_text(LOGICAL_HPP_TEMPLATE.format(**common)) + logical_cpp_path.write_text(LOGICAL_CPP_TEMPLATE.format(**common)) + physical_hpp_path.write_text(PHYSICAL_HPP_TEMPLATE.format(**common)) + + physical_common = dict(common) + physical_common["registrar_pushes"] = registrar_p + if op.get("build_generic"): + physical_cpp_path.write_text(assemble_generic_physical(op)) + elif op.get("build_two_temporal_points_with_dist"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TEMPORAL_POINTS_WITH_DIST.format(**physical_common)) + elif op.get("build_temporal_point_with_dist"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT_WITH_DIST.format(**physical_common)) + elif op.get("build_two_temporal_points"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TEMPORAL_POINTS.format(**physical_common)) + elif op.get("build_temporal_point_restriction"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT_RESTRICTION.format(**physical_common)) + elif op.get("build_two_tpose_points_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TPOSE_POINTS_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_tpose_point_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TPOSE_POINT_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_two_tnpoint_points_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TNPOINT_POINTS_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_tnpoint_point_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TNPOINT_POINT_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_two_tpose_points_with_dist_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TPOSE_POINTS_WITH_DIST_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_tpose_point_with_dist_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TPOSE_POINT_WITH_DIST_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_two_tnpoint_points_with_dist_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TNPOINT_POINTS_WITH_DIST_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_tnpoint_point_with_dist_via_composition"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TNPOINT_POINT_WITH_DIST_VIA_COMPOSITION.format(**physical_common)) + elif op.get("build_two_tcbuffer_points_with_dist"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TCBUFFER_POINTS_WITH_DIST.format(**physical_common)) + elif op.get("build_tcbuffer_point_cbuffer_with_dist"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT_CBUFFER_WITH_DIST.format(**physical_common)) + elif op.get("build_tcbuffer_point_with_dist"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT_WITH_DIST.format(**physical_common)) + elif op.get("build_two_tcbuffer_points"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TCBUFFER_POINTS.format(**physical_common)) + elif op.get("build_tcbuffer_point_cbuffer"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT_CBUFFER.format(**physical_common)) + elif op.get("build_tcbuffer_point"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT.format(**physical_common)) + elif op.get("build_temporal_point"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT.format(**physical_common)) + elif op.get("build_tnumber_point_with_scalar"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TNUMBER_POINT_WITH_SCALAR.format(**physical_common)) + elif op.get("build_tnumber_scalar_first"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TNUMBER_SCALAR_FIRST.format(**physical_common)) + elif op.get("build_two_tnumber_points"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TNUMBER_POINTS.format(**physical_common)) + elif op.get("build_stbox_stbox"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_STBOX_STBOX.format(**physical_common)) + elif op.get("build_stbox_tspatial"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_STBOX_TSPATIAL.format(**physical_common)) + elif op.get("build_tspatial_stbox"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TSPATIAL_STBOX.format(**physical_common)) + elif op.get("build_tbox_tnumber"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TBOX_TNUMBER.format(**physical_common)) + elif op.get("build_tnumber_tbox"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TNUMBER_TBOX.format(**physical_common)) + elif op.get("build_tbool_point"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TBOOL_POINT.format(**physical_common)) + elif op.get("build_tnumber_tnumber_wkb"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TNUMBER_TNUMBER_WKB.format(**physical_common)) + elif op.get("build_two_tnumber_sep_ts"): + physical_cpp_path.write_text(PHYSICAL_CPP_TEMPLATE_TWO_TNUMBER_SEP_TS.format(**physical_common)) + else: + sys.stderr.write( + f" ! {nebula_name}: physical-cpp template for non-temporal-point ops is not yet implemented; " + f"skipping .cpp — the .hpp + logical files are still emitted, but the .cpp must be hand-written.\n" + ) + + sys.stderr.write(f" ✓ {nebula_name}: emitted 4 files ({logical_hpp_path.relative_to(output_root)} + siblings)\n") + + +# Physical .cpp template for one-temporal-point restriction operators — +# MEOS signature `Temporal* fn(const Temporal*, const GSERIALIZED*)`. The +# returned Temporal* is checked for non-null (i.e. survived the restriction), +# freed, and reduced to an int (1 = survives, 0 = clipped/null/error). +# Per-event single-instant semantics: equivalent to a filter predicate. +# Mirrors mariana's TemporalAtStBox int-collapse pattern. +PHYSICAL_CPP_TEMPLATE_TEMPORAL_POINT_RESTRICTION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS restriction call — returns Temporal* (non-null if the + // input survived the restriction, null if clipped/empty). + // For per-event single-instant inputs this collapses to a + // filter predicate: 1 if the point survives, 0 if clipped. + Temporal* clipped = {meos_call}(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + if (clipped == nullptr) return 0; + free(clipped); + return 1; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for one-tcbuffer-point operators with a static +# geometry — e.g. econtains_tcbuffer_geo. The MEOS call signature is +# ` fn(const Temporal*, const GSERIALIZED*)` where the Temporal is a +# tcbuffer (Cbuffer instant) built per-event from (lon, lat, radius, ts). +# WKT format: "Cbuffer(Point(lon lat),radius)@ts". +# 5 SQL args: lon, lat, radius, ts, geometry. +PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) {{ free(tcbuffer); return 0; }} + + {return_type} r = {meos_call}(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tpose × static geom spatial-rels VIA +# COMPOSITION — the existing _tgeo_geo MEOS call is applied to a tpose +# converted to tgeompoint at run time. Per-event tpose instant from +# (x, y, theta, ts), then tpose_to_tpoint(), then the MEOS spatial-rel +# call. Matches MobilityDB PR #987's SQL-level composition recipe at the +# binding layer (no new MEOS spatial-rel symbols are needed for tpose). +# 5 SQL args: x, y, theta, ts, geometry. +PHYSICAL_CPP_TEMPLATE_TPOSE_POINT_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({{}} {{}}), {{}})@{{}}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) {{ free(tpose); return 0; }} + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) {{ free(tgeo); free(tpose); return 0; }} + + {return_type} r = {meos_call}(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tpose × tpose spatial-rels VIA COMPOSITION — +# the existing _tgeo_tgeo MEOS call is applied to two tposes each converted +# to a single-instant tgeompoint at run time. Per-event tpose instants from +# (xA, yA, thetaA, tsA) and (xB, yB, thetaB, tsB), each tpose_in() then +# tpose_to_tpoint(), then the MEOS two-temporal spatial-rel call. Mirrors the +# W14 one-tpose composition recipe; no new MEOS symbols are needed for tpose +# (the _tgeo_tgeo row was shipped in W3). 8 SQL args. +PHYSICAL_CPP_TEMPLATE_TWO_TPOSE_POINTS_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({{}} {{}}), {{}})@{{}}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({{}} {{}}), {{}})@{{}}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) {{ free(tposeA); return 0; }} + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) {{ free(tgeoA); free(tposeA); return 0; }} + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) {{ free(tposeB); free(tgeoA); free(tposeA); return 0; }} + + {return_type} r = {meos_call}(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tnpoint × static geom spatial-rels VIA +# COMPOSITION — a temporal network point is resolved to a temporal +# geometry point at run time (tnpoint_to_tgeompoint, which looks up each +# route's geometry from the MEOS ways network), then the existing +# _tgeo_geo spatial-rel is applied. Same shape as the tpose composition +# (W14); no new MEOS spatial-rel symbols are needed for tnpoint. +# NOTE: tnpoint_to_tgeompoint yields a tgeompoint in the *network* SRID, +# so the static geometry must use that SRID (else MEOS errors on mixed +# SRID). 4 SQL args: rid, fraction, ts, geometry. +PHYSICAL_CPP_TEMPLATE_TNPOINT_POINT_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({{}}, {{}})@{{}}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) {{ free(tnpoint); return 0; }} + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) {{ free(tgeo); free(tnpoint); return 0; }} + + {return_type} r = {meos_call}(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tnpoint × tnpoint spatial-rels VIA +# COMPOSITION — two temporal network points each resolved to a temporal +# geometry point (tnpoint_to_tgeompoint), then the existing _tgeo_tgeo +# spatial-rel (W3) is applied. Both operands land in the network SRID, so +# no mixed-SRID concern (unlike tnpoint × static geom). 6 SQL args: +# ridA, fracA, tsA, ridB, fracB, tsB. +PHYSICAL_CPP_TEMPLATE_TWO_TNPOINT_POINTS_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({{}}, {{}})@{{}}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({{}}, {{}})@{{}}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) {{ free(tnpointA); return 0; }} + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) {{ free(tgeoA); free(tnpointA); return 0; }} + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) {{ free(tnpointB); free(tgeoA); free(tnpointA); return 0; }} + + {return_type} r = {meos_call}(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tpose × static geom dwithin VIA COMPOSITION — +# the tpose composition body (W14) plus a trailing `double dist` forwarded +# to the 3-arg `_tgeo_geo` dwithin call. 6 SQL args: x, y, theta, ts, +# geometry, dist. +PHYSICAL_CPP_TEMPLATE_TPOSE_POINT_WITH_DIST_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({{}} {{}}), {{}})@{{}}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) {{ free(tpose); return 0; }} + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) {{ free(tgeo); free(tpose); return 0; }} + + {return_type} r = {meos_call}(tgeo, staticGeometry.getGeometry(), distValue); + free(tgeo); + free(tpose); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tpose × tpose dwithin VIA COMPOSITION — the +# two-tpose composition body (W15) plus a trailing `double dist` forwarded +# to the 3-arg `_tgeo_tgeo` dwithin call. 9 SQL args. +PHYSICAL_CPP_TEMPLATE_TWO_TPOSE_POINTS_WITH_DIST_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue, + double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({{}} {{}}), {{}})@{{}}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({{}} {{}}), {{}})@{{}}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) {{ free(tposeA); return 0; }} + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) {{ free(tgeoA); free(tposeA); return 0; }} + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) {{ free(tposeB); free(tgeoA); free(tposeA); return 0; }} + + {return_type} r = {meos_call}(tgeoA, tgeoB, distValue); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB, dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tnpoint × static geom dwithin VIA COMPOSITION — +# tnpoint composition body (W18) plus a trailing `double dist` forwarded to +# the 3-arg `_tgeo_geo` dwithin call. 5 SQL args: rid, fraction, ts, +# geometry, dist. +PHYSICAL_CPP_TEMPLATE_TNPOINT_POINT_WITH_DIST_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({{}}, {{}})@{{}}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) {{ free(tnpoint); return 0; }} + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) {{ free(tgeo); free(tnpoint); return 0; }} + + {return_type} r = {meos_call}(tgeo, staticGeometry.getGeometry(), distValue); + free(tgeo); + free(tnpoint); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tnpoint × tnpoint dwithin VIA COMPOSITION — the +# two-tnpoint composition body (W18) plus a trailing `double dist` forwarded +# to the 3-arg `_tgeo_tgeo` dwithin call. 7 SQL args. +PHYSICAL_CPP_TEMPLATE_TWO_TNPOINT_POINTS_WITH_DIST_VIA_COMPOSITION = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue, + double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({{}}, {{}})@{{}}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({{}}, {{}})@{{}}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) {{ free(tnpointA); return 0; }} + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) {{ free(tgeoA); free(tnpointA); return 0; }} + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) {{ free(tnpointB); free(tgeoA); free(tnpointA); return 0; }} + + {return_type} r = {meos_call}(tgeoA, tgeoB, distValue); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + ridA, fractionA, tsA, ridB, fractionB, tsB, dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for one-tcbuffer-point + static geom + dist — +# e.g. edwithin_tcbuffer_geo. Same per-event tcbuffer construction as +# PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT but trailing `double dist`. +# 6 SQL args: lon, lat, radius, ts, geometry, dist. +PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT_WITH_DIST = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) {{ free(tcbuffer); return 0; }} + + {return_type} r = {meos_call}(tcbuffer, staticGeometry.getGeometry(), distValue); + free(tcbuffer); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + +# Physical .cpp template for one-tcbuffer-point + static Cbuffer + dist — +# e.g. edwithin_tcbuffer_cbuffer. +# 6 SQL args: lon, lat, radius, ts, cbufferLiteral, dist. +PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT_CBUFFER_WITH_DIST = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* cbufLitPtr, uint32_t cbufLitSize, double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) {{ free(tcbuffer); return 0; }} + + {return_type} r = {meos_call}(tcbuffer, cb, distValue); + free(tcbuffer); + free(cb); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize(), dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + +# Physical .cpp template for two-tcbuffer-points + dist — e.g. +# edwithin_tcbuffer_tcbuffer. 9 SQL args: lonA, latA, radiusA, tsA, +# lonB, latB, radiusB, tsB, dist. +PHYSICAL_CPP_TEMPLATE_TWO_TCBUFFER_POINTS_WITH_DIST = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue, + double distValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) {{ free(tA); return 0; }} + + {return_type} r = {meos_call}(tA, tB, distValue); + free(tA); + free(tB); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for TWO tcbuffer points (no static arg) — e.g. +# eintersects_tcbuffer_tcbuffer. Two per-event tcbuffer instants built +# from (lonA, latA, radiusA, tsA) and (lonB, latB, radiusB, tsB). +# MEOS signature: `int fn(const Temporal*, const Temporal*)`. +# 8 SQL args. +PHYSICAL_CPP_TEMPLATE_TWO_TCBUFFER_POINTS = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) {{ free(tA); return 0; }} + + {return_type} r = {meos_call}(tA, tB); + free(tA); + free(tB); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for one-tcbuffer-point operators with a STATIC +# CBUFFER second arg — e.g. econtains_tcbuffer_cbuffer. Same per-event +# tcbuffer construction as PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT; the +# second arg is parsed via cbuffer_in() from a literal WKT +# "Cbuffer(Point(lon lat),radius)" instead of as a GSERIALIZED geometry. +# MEOS signature: `int fn(const Temporal*, const Cbuffer*)`. +# 5 SQL args: lon, lat, radius, ts, cbufferLiteral. +PHYSICAL_CPP_TEMPLATE_TCBUFFER_POINT_CBUFFER = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) {{ free(tcbuffer); return 0; }} + + {return_type} r = {meos_call}(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + }} + catch (const std::exception&) + {{ + return 0; + }} + }}, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for one-tnumber-point operators with a trailing +# scalar (double or int) — e.g. nad_tfloat_float, nad_tint_int. The MEOS +# call signature is ` fn(const Temporal*, )`. +# 3 args: value, timestamp, scalar. +PHYSICAL_CPP_TEMPLATE_TNUMBER_POINT_WITH_SCALAR = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double {{ + try {{ + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{tnumber_wkt_format}", {value_fmt_expr}, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = {tnumber_in_fn}(tempWkt.c_str()); + if (!temp) return 0.0; + int r = {meos_call}(temp, {threshold_call_expr}); + free(temp); + return static_cast(r); + }} catch (const std::exception&) {{ return 0.0; }} + }}, + value, threshold, ts); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + +# Physical .cpp template for two-tnumber-point operators (e.g. nad_tfloat_tfloat, +# nad_tint_tint). MEOS signature ` fn(const Temporal*, const Temporal*)`. +# 4 args: valueA, tsA, valueB, tsB. +PHYSICAL_CPP_TEMPLATE_TWO_TNUMBER_POINTS = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value1 = parameterValues[0].cast>(); + auto value2 = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double v1, double v2, uint64_t t) -> double {{ + try {{ + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt1 = fmt::format("{tnumber_wkt_format}", {value1_fmt_expr}, ts_str); + std::string wkt2 = fmt::format("{tnumber_wkt_format}", {value2_fmt_expr}, ts_str); + Temporal* temp1 = {tnumber_in_fn}(wkt1.c_str()); + if (!temp1) return 0.0; + Temporal* temp2 = {tnumber_in_fn}(wkt2.c_str()); + if (!temp2) {{ free(temp1); return 0.0; }} + int r = {meos_call}(temp1, temp2); + free(temp1); + free(temp2); + return static_cast(r); + }} catch (const std::exception&) {{ return 0.0; }} + }}, + value1, value2, ts); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp for scalar-FIRST tnumber operators — the MEOS signature is +# ` fn(scalar, const Temporal*)` (e.g. ever_eq_float_tfloat, +# always_lt_int_tint). Identical to TNUMBER_POINT_WITH_SCALAR except the MEOS +# call passes the scalar as the FIRST argument. Per-event SQL shape is still +# (value, timestamp, scalar) so it reuses DISPATCH_CASE_TNUMBER_POINT_WITH_SCALAR. +PHYSICAL_CPP_TEMPLATE_TNUMBER_SCALAR_FIRST = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double {{ + try {{ + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{tnumber_wkt_format}", {value_fmt_expr}, ts_str); + Temporal* temp = {tnumber_in_fn}(wkt.c_str()); + if (!temp) return 0.0; + int r = {meos_call}({scalar_call_expr}, temp); + free(temp); + return static_cast(r); + }} catch (const std::exception&) {{ return 0.0; }} + }}, + scalar, value, ts); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for STBox vs STBox operators — e.g. adjacent_stbox_stbox, +# nad_stbox_stbox, stbox_cmp. Both operands are VARSIZED text parsed via stbox_in(). +# 2 args: box (VariableSizedData), arg0 (VariableSizedData). +PHYSICAL_CPP_TEMPLATE_STBOX_STBOX = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return {zero_return}; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) {{ free(temp); return {zero_return}; }} + {return_type} r = {meos_call}(temp, arg0B); + free(temp); + free(arg0B); + return r; + }} + catch (const std::exception&) + {{ + return {zero_return}; + }} + }}, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for STBox (VARSIZED) vs per-event tgeompoint operators — +# e.g. adjacent_stbox_tspatial, contains_stbox_tspatial. 4 args: lon, lat, ts, arg0 +# (the STBox literal). MEOS call order: fn(stbox, temporal) — STBox FIRST. +PHYSICAL_CPP_TEMPLATE_STBOX_TSPATIAL = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return {zero_return}; + std::string tempWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return {zero_return}; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) {{ free(temp); return {zero_return}; }} + {return_type} r = {meos_call}(arg0B, temp); + free(temp); + free(arg0B); + return r; + }} + catch (const std::exception&) + {{ + return {zero_return}; + }} + }}, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for per-event tgeompoint vs STBox (VARSIZED) operators — +# e.g. adjacent_tspatial_stbox, nad_tgeo_stbox. 4 args: lon, lat, ts, arg0 (STBox). +# MEOS call order: fn(temporal, stbox) — temporal FIRST. +PHYSICAL_CPP_TEMPLATE_TSPATIAL_STBOX = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return {zero_return}; + std::string tempWkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return {zero_return}; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) {{ free(temp); return {zero_return}; }} + {return_type} r = {meos_call}(temp, arg0B); + free(temp); + free(arg0B); + return r; + }} + catch (const std::exception&) + {{ + return {zero_return}; + }} + }}, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for TBox (VARSIZED) vs per-event tfloat operators — +# e.g. adjacent_tbox_tnumber. 3 args: value (double), ts (uint64_t), arg0 (TBox). +# MEOS call order: fn(tbox, temporal) — TBox FIRST. Returns bool. +PHYSICAL_CPP_TEMPLATE_TBOX_TNUMBER = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{{}}@{{}}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) {{ free(temp); return false; }} + bool r = {meos_call}(arg0B, temp); + free(temp); + free(arg0B); + return r; + }} + catch (const std::exception&) + {{ + return false; + }} + }}, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for per-event tnumber vs TBox (VARSIZED) operators — +# e.g. adjacent_tnumber_tbox, nad_tfloat_tbox, nad_tint_tbox. 3 args: value +# ({tnumber_value_cpp_type}), ts (uint64_t), arg0 (TBox). MEOS call order: +# fn(temporal, tbox) — temporal FIRST. Return type and input fn are parametric. +PHYSICAL_CPP_TEMPLATE_TNUMBER_TBOX = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[]({tnumber_value_cpp_type} value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{{}}@{{}}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = {tnumber_in_fn}(tempWkt.c_str()); + if (!temp) return {zero_return}; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) {{ free(temp); return {zero_return}; }} + {return_type} r = {meos_call}(temp, arg0B); + free(temp); + free(arg0B); + return r; + }} + catch (const std::exception&) + {{ + return {zero_return}; + }} + }}, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tbool single-instant operators (e.g. tbool_end_value, +# tbool_start_value). 2 args: value (bool), ts (uint64_t). Returns bool. +PHYSICAL_CPP_TEMPLATE_TBOOL_POINT = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](bool value, + uint64_t ts) -> bool {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{{}}@{{}}", value ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + bool r = {meos_call}(temp); + free(temp); + return r; + }} + catch (const std::exception&) + {{ + return false; + }} + }}, + value, ts); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for tnumber-vs-tnumber WKB operators — bbox predicates +# over two hex-WKB temporal numbers (e.g. adjacent_tnumber_tnumber). Both args are +# VariableSizedData parsed via temporal_from_hexwkb(). Returns bool. +PHYSICAL_CPP_TEMPLATE_TNUMBER_TNUMBER_WKB = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) {{ free(temp); return false; }} + bool r = {meos_call}(temp, arg0T); + free(temp); + free(arg0T); + return r; + }} + catch (const std::exception&) + {{ + return false; + }} + }}, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# Physical .cpp template for two-tnumber-point operators with separate timestamps — +# e.g. nad_tfloat_tfloat, nad_tint_tint. 4 args: valueA, tsA, valueB, tsB. +# Uses {tnumber_value_cpp_type} and {tnumber_in_fn} for the per-type variant; +# {return_type}/{zero_return} for nad (double/int) vs predicate (bool) variants. +PHYSICAL_CPP_TEMPLATE_TWO_TNUMBER_SEP_TS = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +#include +#include +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto valueA = parameterValues[0].cast>(); + auto tsA = parameterValues[1].cast>(); + auto valueB = parameterValues[2].cast>(); + auto tsB = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[]({tnumber_value_cpp_type} valueAValue, uint64_t tsAValue, + {tnumber_value_cpp_type} valueBValue, uint64_t tsBValue) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + const std::string tsAStr = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBStr = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("{{}}@{{}}", valueAValue, tsAStr); + std::string wktB = fmt::format("{{}}@{{}}", valueBValue, tsBStr); + Temporal* tempA = {tnumber_in_fn}(wktA.c_str()); + if (!tempA) return {zero_return}; + Temporal* tempB = {tnumber_in_fn}(wktB.c_str()); + if (!tempB) {{ free(tempA); return {zero_return}; }} + {return_type} r = {meos_call}(tempA, tempB); + free(tempA); + free(tempB); + return r; + }} + catch (const std::exception&) + {{ + return {zero_return}; + }} + }}, + valueA, tsA, valueB, tsB); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# =========================================================================== +# Generalized per-event operator assembler (the "generic" shape). +# +# Composes a physical .cpp from three orthogonal parts instead of a hand-written +# template per shape: +# - INPUT builder : how to construct the primary `Temporal* temp` of a +# given temporal type from per-event fields, +# - EXTRA args : 0+ trailing MEOS args (scalar / static geometry), +# - RETURN marshaler : how the scalar MEOS return becomes the VarVal. +# Scope: Temporal-input operators with a SCALAR return (int/double/bool) — the +# proven lambda-returns-scalar pattern. Variable-sized (text*/GSERIALIZED*) and +# Temporal*-extract returns, and Set/Span/Box inputs, are out of this assembler. +# =========================================================================== + +# input_type -> dict(fields=[(name,cpp)], header, build) where build is C++ that +# defines `Temporal* {var}` (NULL-checked) from the fields. {z} = zero-return literal. +GENERIC_INPUTS = { + "tgeompoint": dict(fields=[("lon", "double"), ("lat", "double"), ("ts", "uint64_t")], header="meos_geo.h", build=( + ' if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return {z};\n' + ' std::string {var}Wkt = fmt::format("SRID=4326;Point({{}} {{}})@{{}}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tgeompoint_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tgeometry": dict(fields=[("geomWkt", "VariableSizedData"), ("ts", "uint64_t")], header="meos_geo.h", build=( + ' std::string {var}G(geomWktPtr, geomWktSize);\n' + ' std::string {var}Wkt = {var}G + "@" + MEOS::Meos::convertEpochToTimestamp(ts);\n' + ' Temporal* {var} = tgeometry_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tcbuffer": dict(fields=[("lon", "double"), ("lat", "double"), ("radius", "double"), ("ts", "uint64_t")], header="meos_cbuffer.h", build=( + ' if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0) || radius < 0.0) return {z};\n' + ' std::string {var}Wkt = fmt::format("Cbuffer(Point({{}} {{}}),{{}})@{{}}", lon, lat, radius, MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tcbuffer_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tpose": dict(fields=[("x", "double"), ("y", "double"), ("theta", "double"), ("ts", "uint64_t")], header="meos_pose.h", build=( + ' std::string {var}Wkt = fmt::format("Pose(Point({{}} {{}}),{{}})@{{}}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tpose_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tnpoint": dict(fields=[("rid", "int64_t"), ("frac", "double"), ("ts", "uint64_t")], header="meos_npoint.h", build=( + ' if (frac < 0.0 || frac > 1.0) return {z};\n' + ' std::string {var}Wkt = fmt::format("NPoint({{}},{{}})@{{}}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tnpoint_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tfloat": dict(fields=[("value", "double"), ("ts", "uint64_t")], header="meos_geo.h", build=( + ' std::string {var}Wkt = fmt::format("{{}}@{{}}", value, MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tfloat_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tint": dict(fields=[("value", "int32_t"), ("ts", "uint64_t")], header="meos_geo.h", build=( + ' std::string {var}Wkt = fmt::format("{{}}@{{}}", value, MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tint_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tbool": dict(fields=[("value", "double"), ("ts", "uint64_t")], header="meos_geo.h", build=( + ' std::string {var}Wkt = fmt::format("{{}}@{{}}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tbool_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + "tbigint": dict(fields=[("value", "double"), ("ts", "uint64_t")], header="meos_geo.h", build=( + ' std::string {var}Wkt = fmt::format("{{}}@{{}}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts));\n' + ' Temporal* {var} = tbigint_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + # The efficient mechanism: the operand is an UPSTREAM MEOS value (a windowed + # mini-trip trajectory, or any temporal) carried as a VARSIZED hex-WKB field, + # not rebuilt from per-event scalars. The MEOS function library composes over + # such values like scalar functions over a float. hex-WKB is the (testable, + # ASCII) canonical form; raw WKB is a later optimization. + "wkb_temporal": dict(fields=[("traj", "VariableSizedData")], header="meos_geo.h", build=( + ' std::string {var}Hex(trajPtr, trajSize);\n' + ' Temporal* {var} = temporal_from_hexwkb({var}Hex.c_str());\n' + ' if (!{var}) return {z};\n')), + # A bounding STBox carried as a VARSIZED text field — the per-vehicle + # TSPATIAL_EXTENT output (stbox_out). Used as the first operand of a + # cross-vehicle predicate f(boxA, boxB); the second box is a `box` extra arg + # (also stbox_in). Freed via free(temp) by the generic cleanup. + "stbox_text": dict(fields=[("box", "VariableSizedData")], header="meos_geo.h", build=( + ' std::string {var}S(boxPtr, boxSize);\n' + ' while (!{var}S.empty() && ({var}S.front()==\'\\\'\' || {var}S.front()==\'"\')) {var}S.erase({var}S.begin());\n' + ' while (!{var}S.empty() && ({var}S.back()==\'\\\'\' || {var}S.back()==\'"\')) {var}S.pop_back();\n' + ' STBox* {var} = stbox_in({var}S.c_str());\n' + ' if (!{var}) return {z};\n')), + # th3index temporal instant: 2 fields (cell:uint64, ts:uint64). + # Constructs a Temporal* via th3indexinst_make. Requires meos_h3.h. + "th3index": dict(fields=[("cell", "uint64_t"), ("ts", "uint64_t")], header="meos_h3.h", build=( + ' Temporal* {var} = th3indexinst_make((H3Index)cell, (TimestampTz)ts);\n' + ' if (!{var}) return {z};\n')), + # tquadbin temporal instant: 2 fields (cell:uint64, ts:uint64). + "tquadbin": dict(fields=[("cell", "uint64_t"), ("ts", "uint64_t")], header="meos_quadbin.h", build=( + ' Temporal* {var} = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts);\n' + ' if (!{var}) return {z};\n')), + # ttext temporal instant: 2 fields (value:VARSIZED text string, ts:uint64). + # Strips outer quotes, builds WKT "'value'@ts", parses via ttext_in. + "ttext": dict(fields=[("value", "VariableSizedData"), ("ts", "uint64_t")], header="meos.h", build=( + ' std::string {var}Val(valuePtr, valueSize);\n' + ' while (!{var}Val.empty() && ({var}Val.front() == \'\\\'\' || {var}Val.front() == \'"\')) {var}Val.erase({var}Val.begin());\n' + ' while (!{var}Val.empty() && ({var}Val.back() == \'\\\'\' || {var}Val.back() == \'"\')) {var}Val.pop_back();\n' + ' std::string {var}Wkt = "\'" + {var}Val + "\'@" + MEOS::Meos::convertEpochToTimestamp(ts);\n' + ' Temporal* {var} = ttext_in({var}Wkt.c_str());\n' + ' if (!{var}) return {z};\n')), + # tjsonb temporal instant: 2 fields (json_str:VARSIZED, ts:uint64). + # Parses json_str via jsonb_in, then constructs instant via tjsonbinst_make. + "tjsonb": dict(fields=[("json_str", "VariableSizedData"), ("ts", "uint64_t")], header="meos_json.h", build=( + ' std::string {var}S(json_strPtr, json_strSize);\n' + ' Jsonb* {var}Jb = jsonb_in({var}S.c_str());\n' + ' if (!{var}Jb) return {z};\n' + ' Temporal* {var} = (Temporal*)tjsonbinst_make({var}Jb, (TimestampTz)ts);\n' + ' free({var}Jb);\n' + ' if (!{var}) return {z};\n')), + # static_scalar: no temporal construction; the "build" step is empty. + # All meaningful args are passed via extra_args. Primary fields must be + # declared and the call_terms assembled by the caller via extra_args only. + # Use primary_fields in descriptor to specify the leading fields, and + # extra_args for each call argument. The build string does nothing. + # (Helper: use "static_scalar" as input_type; override primary_fields.) + "static_scalar": dict(fields=[], header="meos.h", build=''), + # geom_wkt: a single geometry carried as a VARSIZED WKT/EWKT field. + # Parses via geom_in(s.c_str(), -1); result is GSERIALIZED* named "temp". + # Freed after the call by the free(temp) in call_marshal (like other temporals). + "geom_wkt": dict(fields=[("wkt", "VariableSizedData")], header="meos_geo.h", build=( + ' std::string {var}S(wktPtr, wktSize);\n' + ' GSERIALIZED* {var} = geom_in({var}S.c_str(), -1);\n' + ' if (!{var}) return {z};\n')), + # geog_wkt: geography variant (carried as VARSIZED WKT); parsed via geog_in. + "geog_wkt": dict(fields=[("wkt", "VariableSizedData")], header="meos_geo.h", build=( + ' std::string {var}S(wktPtr, wktSize);\n' + ' GSERIALIZED* {var} = geog_in({var}S.c_str(), -1);\n' + ' if (!{var}) return {z};\n')), + # jsonb_wkt: a single Jsonb value as a VARSIZED JSON string. + "jsonb_wkt": dict(fields=[("jb", "VariableSizedData")], header="meos_json.h", build=( + ' std::string {var}S(jbPtr, jbSize);\n' + ' Jsonb* {var} = jsonb_in({var}S.c_str());\n' + ' if (!{var}) return {z};\n')), + # text_wkt: a single text value as a VARSIZED string (strips quotes). + "text_wkt": dict(fields=[("str", "VariableSizedData")], header="meos.h", build=( + ' std::string {var}RawStr(strPtr, strSize);\n' + ' while (!{var}RawStr.empty() && ({var}RawStr.front() == \'\\\'\' || {var}RawStr.front() == \'"\')) {var}RawStr.erase({var}RawStr.begin());\n' + ' while (!{var}RawStr.empty() && ({var}RawStr.back() == \'\\\'\' || {var}RawStr.back() == \'"\')) {var}RawStr.pop_back();\n' + ' text* {var} = cstring_to_text({var}RawStr.c_str());\n' + ' if (!{var}) return {z};\n')), + # intspan_wkt: an intspan as VARSIZED text; parsed via intspan_in. + "intspan_wkt": dict(fields=[("sp", "VariableSizedData")], header="meos.h", build=( + ' std::string {var}S(spPtr, spSize);\n' + ' Span* {var} = intspan_in({var}S.c_str());\n' + ' if (!{var}) return {z};\n')), + # floatspan_wkt: a floatspan as VARSIZED text; parsed via floatspan_in. + "floatspan_wkt": dict(fields=[("sp", "VariableSizedData")], header="meos.h", build=( + ' std::string {var}S(spPtr, spSize);\n' + ' Span* {var} = floatspan_in({var}S.c_str());\n' + ' if (!{var}) return {z};\n')), +} + +# return_kind -> (cpp_return_type, nautilus_return, zero_literal, extract_fn|None) +# For a direct scalar return extract_fn is None. For a Temporal*-returning +# transform/restriction whose single-instant result carries a scalar value, the +# extract_fn is the result type's *_start_value accessor (the value at the +# single instant); the wrapper temporal is freed. +GENERIC_RETURNS = { + "int": ("int", "INT32", "0", None), + "double": ("double", "FLOAT64", "0.0", None), + "bool": ("bool", "BOOLEAN", "false", None), + "extract_int": ("int", "INT32", "0", "tint_start_value"), + "extract_double": ("double", "FLOAT64", "0.0", "tfloat_start_value"), + "extract_bool": ("bool", "BOOLEAN", "false", "tbool_start_value"), + "extract_bigint": ("double", "FLOAT64", "0.0", "tbigint_start_value"), + # A Temporal*-returning transform whose result is serialized back to hex-WKB + # and emitted as a VARSIZED field (the cross-operator exchange form). Handled + # by assemble_wkb_output, not the scalar GENERIC_PHYSICAL_TEMPLATE. + "wkb": ("VariableSizedData", "VARSIZED", "nullptr", None), + # VARSIZED output kinds — these route through assemble_varsized_output, + # not the scalar GENERIC_PHYSICAL_TEMPLATE. The zero literal "0u" means + # an empty arena slot (zero actualLen) on error. + # The meos_call returns char* directly (e.g. text_to_cstring, h3index_out, + # quadbin_index_to_string, quadbin_cell_to_quadkey); copied to arena, freed. + "varsized_cstring": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns GSERIALIZED*; serialise via geo_as_text (WKT), copy to arena. + "varsized_geom": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns text*; extract via text_to_cstring, copy to arena. + "varsized_text": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns H3Index (uint64_t); serialise via h3index_out, copy. + "varsized_h3out": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns Quadbin (uint64_t); serialise via quadbin_index_to_string. + "varsized_quadbin": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns Temporal* (th3index) whose single-instant value is + # an H3Index; extract via th3index_start_value, serialise via h3index_out. + "varsized_th3index": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns Temporal* (ttext) whose single-instant value is + # text*; extract via ttext_start_value, then text_to_cstring. + "varsized_ttext": ("VariableSizedData", "VARSIZED", "0u", None), + # The meos_call returns Temporal* (tjsonb) whose single-instant value is + # Jsonb*; extract via tjsonb_start_value, serialise via jsonb_to_cstring. + "varsized_tjsonb": ("VariableSizedData", "VARSIZED", "0u", None), +} + + +def _generic_field_decl(name, cpp): + """Lambda parameter declaration + the cast expression for one event field.""" + if cpp == "VariableSizedData": + return None # handled specially (pointer + size pair) + return cpp + + +def assemble_wkb_output(op): + """Physical .cpp for a per-event op that calls f(Temporal*, Temporal*) -> + Temporal* over two hex-WKB VARSIZED operands and emits the result as a + hex-WKB VARSIZED field. The MEOS call + serialization run inside one + nautilus::invoke (returning the heap hex string); the bytes are then copied + into an arena-allocated VariableSizedData (the canonical VARSIZED-output + idiom, see TemporalDerivativeExpAggregation::lower). A null/empty result + yields a zero-length VARSIZED.""" + name = op["nebula_name"] + headers = {"meos.h", "meos_geo.h"} + for h in op.get("extra_headers", []): + headers.add(h) + inc = "\n".join(f"#include <{h}>" for h in + ["meos.h"] + sorted(h for h in headers if h != "meos.h")) + registrar = "\n".join( + [f" auto arg{i} = std::move(arguments.childFunctions[{i}]);" for i in range(2)] + + [f" return {name}PhysicalFunction(std::move(arg0), std::move(arg1));"]) + physical_args = ("PhysicalFunction trajFunction,\n" + " PhysicalFunction arg0Function") + pushes = (" parameterFunctions.push_back(std::move(trajFunction));\n" + " parameterFunctions.push_back(std::move(arg0Function));") + return GENERIC_PHYSICAL_WKB_TEMPLATE.format( + nebula_name=name, includes=inc, meos_call=op["meos_call"], + ctor_physical_args=physical_args, ctor_physical_pushes=pushes, + registrar_pushes=registrar) + + +def _build_generic_fields_and_parse(op, inp, extras, zero): + """Shared helper: derive (fields, headers, call_terms, parse_lines, box_frees) + for both scalar and VARSIZED output generic operators. + + When the descriptor has ``primary_fields`` (a list of [varname, cpptype] pairs) + on a static_scalar op, those fields are used directly as the lambda parameters + and ``meos_call`` is treated as a complete expression (not appended with + ``(callargs)``). In that case the returned call_terms list is left empty and + the caller detects ``op.get("primary_fields")`` to emit the call expression + verbatim.""" + is_static = (op.get("input_type") == "static_scalar") + pf = op.get("primary_fields") # list of [varname, cpptype] or None + + if pf and is_static: + # primary_fields defines the lambda args directly; meos_call is a verbatim + # expression (already contains casts + varnames). We add the fields to the + # parameter list so the ctor/HPP/registrar signatures are correct, but we + # set call_terms to None to signal "emit meos_call as-is". + fields = [(str(name), str(ctype)) for name, ctype in pf] + headers = {"meos.h", inp["header"]} + for h in op.get("extra_headers", []): + headers.add(h) + call_terms = None # sentinel: caller emits op['meos_call'] verbatim + parse_lines = [] + box_frees = [] + return fields, headers, call_terms, parse_lines, box_frees + + fields = list(inp["fields"]) + headers = {"meos.h", inp["header"]} + for h in op.get("extra_headers", []): + headers.add(h) + + # For static_scalar input, the primary call term is just the extra args; + # there is no "temp" temporal object. + call_terms = [] if is_static else ["temp"] + parse_lines = [] + box_frees = [] + + for i, ex in enumerate(extras): + kind = ex["kind"] + if kind == "scalar": + fields.append((f"arg{i}", ex["cpp"])) + call_terms.append(f"arg{i}") + elif kind == "geom": + fields.append((f"arg{i}", "VariableSizedData")) + headers.add("meos_geo.h") + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string arg{i}S(arg{i}Ptr, arg{i}Size);\n' + f' while (!arg{i}S.empty() && (arg{i}S.front()==\'\\\'\' || arg{i}S.front()==\'"\')) arg{i}S.erase(arg{i}S.begin());\n' + f' while (!arg{i}S.empty() && (arg{i}S.back()==\'\\\'\' || arg{i}S.back()==\'"\')) arg{i}S.pop_back();\n' + f' MEOS::Meos::StaticGeometry arg{i}G(arg{i}S);\n' + f' if (!arg{i}G.getGeometry()) {{ {fp}return {zero}; }}\n') + call_terms.append(f"arg{i}G.getGeometry()") + elif kind == "box": + fields.append((f"arg{i}", "VariableSizedData")) + headers.add(ex.get("header", "meos.h")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string arg{i}S(arg{i}Ptr, arg{i}Size);\n' + f' while (!arg{i}S.empty() && (arg{i}S.front()==\'\\\'\' || arg{i}S.front()==\'"\')) arg{i}S.erase(arg{i}S.begin());\n' + f' while (!arg{i}S.empty() && (arg{i}S.back()==\'\\\'\' || arg{i}S.back()==\'"\')) arg{i}S.pop_back();\n' + f' {ex["box_type"]}* arg{i}B = {ex["parser"]}(arg{i}S.c_str());\n' + f' if (!arg{i}B) {{ {fp}return {zero}; }}\n') + call_terms.append(f"arg{i}B") + box_frees.append(f"free(arg{i}B);") + elif kind == "wkb_temporal": + fields.append((f"arg{i}", "VariableSizedData")) + headers.add("meos_geo.h") + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string arg{i}Hex(arg{i}Ptr, arg{i}Size);\n' + f' Temporal* arg{i}T = temporal_from_hexwkb(arg{i}Hex.c_str());\n' + f' if (!arg{i}T) {{ {fp}return {zero}; }}\n') + call_terms.append(f"arg{i}T") + box_frees.append(f"free(arg{i}T);") + elif kind == "bigint_scalar": + fields.append((f"arg{i}", "double")) + call_terms.append(f"static_cast(arg{i})") + elif kind == "bool_scalar": + fields.append((f"arg{i}", "double")) + call_terms.append(f"static_cast(arg{i} != 0.0)") + elif kind == "int_scalar": + fields.append((f"arg{i}", "double")) + call_terms.append(f"static_cast(arg{i})") + elif kind == "uint64_scalar": + # uint64_t argument exposed as uint64_t at Nautilus level (e.g. H3Index, Quadbin) + fields.append((f"arg{i}", "uint64_t")) + cast = ex.get("cast", "") + call_terms.append(f"({cast})arg{i}" if cast else f"arg{i}") + elif kind == "h3index": + # H3Index extra argument: uint64_t field, cast to (H3Index) in call + fields.append((f"arg{i}", "uint64_t")) + call_terms.append(f"(H3Index)arg{i}") + headers.add("meos_h3.h") + elif kind == "quadbin": + # Quadbin extra argument: uint64_t field, cast to (Quadbin) in call + fields.append((f"arg{i}", "uint64_t")) + call_terms.append(f"(Quadbin)arg{i}") + headers.add("meos_quadbin.h") + elif kind == "npoint": + # Static Npoint constructed from (rid:uint64, frac:double) extra fields + fields.append((f"rid{i}", "uint64_t")) + fields.append((f"frac{i}", "double")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_npoint.h") + parse_lines.append( + f' Npoint* np{i} = npoint_make((int64_t)rid{i}, frac{i});\n' + f' if (!np{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"np{i}") + box_frees.append(f"free(np{i});") + elif kind == "pose": + # Static Pose constructed from (x:double, y:double, theta:double) extra fields + fields.append((f"px{i}", "double")) + fields.append((f"py{i}", "double")) + fields.append((f"ptheta{i}", "double")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_pose.h") + parse_lines.append( + f' Pose* pose{i} = pose_make_2d(px{i}, py{i}, ptheta{i}, false, 0);\n' + f' if (!pose{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"pose{i}") + box_frees.append(f"free(pose{i});") + elif kind == "text_varsized": + # text* constructed from a VARSIZED cstring (strips outer quotes) + fields.append((f"arg{i}", "VariableSizedData")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string arg{i}S(arg{i}Ptr, arg{i}Size);\n' + f' while (!arg{i}S.empty() && (arg{i}S.front() == \'\\\'\' || arg{i}S.front() == \'"\')) arg{i}S.erase(arg{i}S.begin());\n' + f' while (!arg{i}S.empty() && (arg{i}S.back() == \'\\\'\' || arg{i}S.back() == \'"\')) arg{i}S.pop_back();\n' + f' text* txt{i} = cstring_to_text(arg{i}S.c_str());\n' + f' if (!txt{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"txt{i}") + box_frees.append(f"free(txt{i});") + elif kind == "jsonb_varsized": + # Jsonb* constructed from a VARSIZED JSON string + fields.append((f"arg{i}", "VariableSizedData")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_json.h") + parse_lines.append( + f' std::string arg{i}S(arg{i}Ptr, arg{i}Size);\n' + f' Jsonb* jb{i} = jsonb_in(arg{i}S.c_str());\n' + f' if (!jb{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"jb{i}") + box_frees.append(f"free(jb{i});") + elif kind == "tjsonb": + # Second tjsonb temporal: (json:VARSIZED, ts:uint64) extra fields + fields.append((f"json{i}", "VariableSizedData")) + fields.append((f"ts{i}", "uint64_t")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_json.h") + parse_lines.append( + f' std::string json{i}S(json{i}Ptr, json{i}Size);\n' + f' Jsonb* jb{i} = jsonb_in(json{i}S.c_str());\n' + f' if (!jb{i}) {{ {fp}return {zero}; }}\n' + f' Temporal* inst{i} = (Temporal*)tjsonbinst_make(jb{i}, (TimestampTz)ts{i});\n' + f' free(jb{i});\n' + f' if (!inst{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"inst{i}") + box_frees.append(f"free(inst{i});") + elif kind == "ttext": + # Second ttext temporal: (value:VARSIZED, ts:uint64) extra fields + fields.append((f"tval{i}", "VariableSizedData")) + fields.append((f"ts{i}", "uint64_t")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string tval{i}S(tval{i}Ptr, tval{i}Size);\n' + f' while (!tval{i}S.empty() && (tval{i}S.front() == \'\\\'\' || tval{i}S.front() == \'"\')) tval{i}S.erase(tval{i}S.begin());\n' + f' while (!tval{i}S.empty() && (tval{i}S.back() == \'\\\'\' || tval{i}S.back() == \'"\')) tval{i}S.pop_back();\n' + f' std::string tval{i}Wkt = "\'" + tval{i}S + "\'@" + MEOS::Meos::convertEpochToTimestamp(ts{i});\n' + f' Temporal* inst{i} = ttext_in(tval{i}Wkt.c_str());\n' + f' if (!inst{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"inst{i}") + box_frees.append(f"free(inst{i});") + elif kind == "th3index": + # Second th3index temporal: (cell:uint64, ts:uint64) extra fields + fields.append((f"cell{i}", "uint64_t")) + fields.append((f"ts{i}", "uint64_t")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_h3.h") + parse_lines.append( + f' Temporal* inst{i} = th3indexinst_make((H3Index)cell{i}, (TimestampTz)ts{i});\n' + f' if (!inst{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"inst{i}") + box_frees.append(f"free(inst{i});") + elif kind == "tquadbin": + # Second tquadbin temporal: (cell:uint64, ts:uint64) extra fields + fields.append((f"cell{i}", "uint64_t")) + fields.append((f"ts{i}", "uint64_t")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_quadbin.h") + parse_lines.append( + f' Temporal* inst{i} = (Temporal*)tquadbininst_make((Quadbin)cell{i}, (TimestampTz)ts{i});\n' + f' if (!inst{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"inst{i}") + box_frees.append(f"free(inst{i});") + elif kind == "tnpoint": + # Second tnpoint temporal: (rid:uint64, frac:double, ts:uint64) extra fields + fields.append((f"rid{i}", "uint64_t")) + fields.append((f"frac{i}", "double")) + fields.append((f"ts{i}", "uint64_t")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_npoint.h") + parse_lines.append( + f' Npoint* np{i} = npoint_make((int64_t)rid{i}, frac{i});\n' + f' if (!np{i}) {{ {fp}return {zero}; }}\n' + f' Temporal* inst{i} = (Temporal*)tnpointinst_make(np{i}, (TimestampTz)ts{i});\n' + f' free(np{i});\n' + f' if (!inst{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"inst{i}") + box_frees.append(f"free(inst{i});") + elif kind == "tpose": + # Second tpose temporal: (x:double, y:double, theta:double, ts:uint64) + fields.append((f"px{i}", "double")) + fields.append((f"py{i}", "double")) + fields.append((f"ptheta{i}", "double")) + fields.append((f"ts{i}", "uint64_t")) + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + headers.add("meos_pose.h") + parse_lines.append( + f' Pose* pose{i}A = pose_make_2d(px{i}, py{i}, ptheta{i}, false, 0);\n' + f' if (!pose{i}A) {{ {fp}return {zero}; }}\n' + f' Temporal* inst{i} = (Temporal*)tposeinst_make(pose{i}A, (TimestampTz)ts{i});\n' + f' free(pose{i}A);\n' + f' if (!inst{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"inst{i}") + box_frees.append(f"free(inst{i});") + elif kind == "geom_wkt": + # Extra geometry arg: VARSIZED WKT parsed via geom_in + fields.append((f"arg{i}", "VariableSizedData")) + headers.add("meos_geo.h") + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string arg{i}S(arg{i}Ptr, arg{i}Size);\n' + f' GSERIALIZED* gs{i} = geom_in(arg{i}S.c_str(), -1);\n' + f' if (!gs{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"gs{i}") + box_frees.append(f"free(gs{i});") + elif kind == "geog_wkt": + # Extra geography arg: VARSIZED WKT parsed via geog_in + fields.append((f"arg{i}", "VariableSizedData")) + headers.add("meos_geo.h") + free_parent = "temp" if not is_static else None + fp = f"free({free_parent}); " if free_parent else "" + parse_lines.append( + f' std::string arg{i}S(arg{i}Ptr, arg{i}Size);\n' + f' GSERIALIZED* gs{i} = geog_in(arg{i}S.c_str(), -1);\n' + f' if (!gs{i}) {{ {fp}return {zero}; }}\n') + call_terms.append(f"gs{i}") + box_frees.append(f"free(gs{i});") + + return fields, headers, call_terms, parse_lines, box_frees + + +def _build_casts_lparams_invoke(fields): + """Build (casts, lparams, invoke) lists from ordered (name, cpp_type) field pairs.""" + casts, lparams, invoke = [], [], [] + for idx, (fn, cpp) in enumerate(fields): + if cpp == "VariableSizedData": + casts.append(f" auto {fn} = parameterValues[{idx}].cast();") + lparams.append(f"const char* {fn}Ptr, uint32_t {fn}Size") + invoke.append(f"{fn}.getContent(), {fn}.getContentSize()") + else: + casts.append(f" auto {fn} = parameterValues[{idx}].cast>();") + lparams.append(f"{cpp} {fn}") + invoke.append(fn) + return casts, lparams, invoke + + +def assemble_varsized_output(op, inp, fields, headers, call_terms, parse_lines, box_frees): + """Build physical .cpp for a build_generic op that returns a VARSIZED arena value. + The nautilus::invoke lambda receives an extra (char* buf, uint32_t bufMax) pair + and returns uint32_t actualLen; the arena write uses VarVal(actualLen).writeToMemory.""" + name = op["nebula_name"] + is_static = (op.get("input_type") == "static_scalar") + zero = "0u" + rk = op["return_kind"] + + casts, lparams, invoke = _build_casts_lparams_invoke(fields) + n_args = len(fields) + + # Add the arena buf/bufMax pair to lambda params and invoke args. + lparams_with_buf = lparams + ["char* buf", "uint32_t bufMax"] + invoke_with_buf = invoke + ["outBuf.getContent()", "nautilus::val(MAX_LEN)"] + + # When meos_call already contains '(' it is a verbatim expression; emit directly. + # call_terms == None also signals the primary_fields verbatim path. + meos_call_str = op['meos_call'] + if call_terms is None or '(' in meos_call_str: + callexpr = meos_call_str + else: + callargs = ", ".join(call_terms) + callexpr = f"{meos_call_str}({callargs})" + bf = "".join(f" {x}\n" for x in box_frees) + build_str = inp["build"].format(var="temp", z=zero) if not is_static else "" + build_str += "".join(parse_lines) + + # Free the primary temporal (if any) before and after the MEOS call. + free_temp = "" if is_static else " free(temp);\n" + + if rk == "varsized_cstring": + # callexpr → char* out; copy to buf, free out + call_marshal = ( + f" char* out = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!out) return 0u;\n" + f" uint32_t len = static_cast(strlen(out));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, out, len);\n" + f" free(out);\n" + f" return len;") + elif rk == "varsized_text": + # callexpr → text*; text_to_cstring → char* → copy → free + call_marshal = ( + f" text* tres = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!tres) return 0u;\n" + f" char* out = text_to_cstring(tres);\n" + f" free(tres);\n" + f" if (!out) return 0u;\n" + f" uint32_t len = static_cast(strlen(out));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, out, len);\n" + f" free(out);\n" + f" return len;") + elif rk == "varsized_h3out": + # callexpr → H3Index (uint64_t); h3index_out → char* hex → copy + call_marshal = ( + f" H3Index hcell = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (hcell == 0) return 0u;\n" + f" char* hex = h3index_out(hcell);\n" + f" if (!hex) return 0u;\n" + f" uint32_t len = static_cast(strlen(hex));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, hex, len);\n" + f" free(hex);\n" + f" return len;") + elif rk == "varsized_quadbin": + # callexpr → Quadbin (uint64_t); quadbin_index_to_string → char* → copy + call_marshal = ( + f" Quadbin qcell = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" char* qstr = quadbin_index_to_string(qcell);\n" + f" if (!qstr) return 0u;\n" + f" uint32_t len = static_cast(strlen(qstr));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, qstr, len);\n" + f" free(qstr);\n" + f" return len;") + elif rk == "varsized_th3index": + # callexpr → Temporal*(th3index); th3index_start_value → H3Index; h3index_out → char* + call_marshal = ( + f" Temporal* tres = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!tres) return 0u;\n" + f" H3Index hcell = th3index_start_value(tres);\n" + f" free(tres);\n" + f" char* hex = h3index_out(hcell);\n" + f" if (!hex) return 0u;\n" + f" uint32_t len = static_cast(strlen(hex));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, hex, len);\n" + f" free(hex);\n" + f" return len;") + elif rk == "varsized_ttext": + # callexpr → Temporal*(ttext); ttext_start_value → text*; text_to_cstring → char* + call_marshal = ( + f" Temporal* tres = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!tres) return 0u;\n" + f" text* txt = ttext_start_value(tres);\n" + f" free(tres);\n" + f" if (!txt) return 0u;\n" + f" char* out = text_to_cstring(txt);\n" + f" free(txt);\n" + f" if (!out) return 0u;\n" + f" uint32_t len = static_cast(strlen(out));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, out, len);\n" + f" free(out);\n" + f" return len;") + elif rk == "varsized_tjsonb": + # callexpr → Temporal*(tjsonb); tjsonb_start_value → Jsonb*; jsonb_to_cstring → char* + call_marshal = ( + f" Temporal* tres = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!tres) return 0u;\n" + f" Jsonb* jbres = (Jsonb*)tjsonb_start_value(tres);\n" + f" free(tres);\n" + f" if (!jbres) return 0u;\n" + f" char* out = jsonb_to_cstring(jbres);\n" + f" free(jbres);\n" + f" if (!out) return 0u;\n" + f" uint32_t len = static_cast(strlen(out));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, out, len);\n" + f" free(out);\n" + f" return len;") + elif rk == "varsized_geom": + # callexpr → GSERIALIZED*; geo_as_text → char* WKT → copy to arena + call_marshal = ( + f" GSERIALIZED* gres = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!gres) return 0u;\n" + f" char* out = geo_as_text(gres, -1);\n" + f" free(gres);\n" + f" if (!out) return 0u;\n" + f" uint32_t len = static_cast(strlen(out));\n" + f" if (len > bufMax) len = bufMax;\n" + f" memcpy(buf, out, len);\n" + f" free(out);\n" + f" return len;") + else: + raise ValueError(f"Unknown varsized return_kind: {rk}") + + inc = "\n".join(f"#include <{h}>" for h in + ["meos.h"] + sorted(h for h in headers if h != "meos.h")) + + physical_args = ",\n ".join( + f"PhysicalFunction {fn}Function" for fn, _ in fields) + pushes = "\n".join(f" parameterFunctions.push_back(std::move({fn}Function));" for fn, _ in fields) + registrar = "\n".join( + [f" auto arg{i} = std::move(arguments.childFunctions[{i}]);" for i in range(n_args)] + + [f" return {name}PhysicalFunction(" + ", ".join(f"std::move(arg{i})" for i in range(n_args)) + ");"]) + + return GENERIC_PHYSICAL_VARSIZED_TEMPLATE.format( + nebula_name=name, includes=inc, + ctor_physical_args=physical_args, n_args=n_args, ctor_physical_pushes=pushes, + casts="\n".join(casts), + lambda_params=",\n ".join(lparams_with_buf), + build=build_str, call_marshal=call_marshal, + invoke_args=", ".join(invoke_with_buf), + registrar_pushes=registrar) + + +def assemble_generic_physical(op): + """Build the physical .cpp for a 'generic' (build_generic) operator.""" + name = op["nebula_name"] + if op["return_kind"] == "wkb": + return assemble_wkb_output(op) + + inp = GENERIC_INPUTS[op["input_type"]] + ret_cpp, _, zero, extract_fn = GENERIC_RETURNS[op["return_kind"]] + extras = op.get("extra_args", []) + + fields, headers, call_terms, parse_lines, box_frees = _build_generic_fields_and_parse( + op, inp, extras, zero) + + # VARSIZED output path — arena allocation instead of VarVal(scalar). + if op["return_kind"].startswith("varsized_"): + # scalar_first/box_first reordering not currently needed for varsized ops + return assemble_varsized_output(op, inp, fields, headers, call_terms, parse_lines, box_frees) + + casts, lparams, invoke = _build_casts_lparams_invoke(fields) + n_args = len(fields) + + build = inp["build"].format(var="temp", z=zero) + "".join(parse_lines) + # static_scalar: build string is empty; call_terms has no "temp" sentinel. + is_static = (op.get("input_type") == "static_scalar") + if is_static: + build = "".join(parse_lines) + + inc = "\n".join(f"#include <{h}>" for h in + ["meos.h"] + sorted(h for h in headers if h != "meos.h")) + + # box_first ops (e.g. above_stbox_tspatial(box, temp)) call with the box/span + # literal before the temporal; the default order is temporal-first. + if op.get("box_first") and len(call_terms) == 2: + call_terms = [call_terms[1], call_terms[0]] + + if op.get("scalar_first"): + # For f(scalar, Temporal*) MEOS calls: the SQL args put scalar first, + # then temporal (value+ts). Reorder so extra arg fields precede the temporal fields. + n_temp_fields = len(inp["fields"]) + extra_fields = fields[n_temp_fields:] + temp_fields = fields[:n_temp_fields] + fields = extra_fields + temp_fields + # call_terms = ["temp", extra_call_terms...] -> [extra_call_terms..., "temp"] + if not is_static: + call_terms = call_terms[1:] + ["temp"] + # Rebuild casts, lparams, invoke from the reordered fields. + casts, lparams, invoke = _build_casts_lparams_invoke(fields) + n_args = len(fields) + + # When meos_call already contains '(' it is a verbatim expression (casts and + # varnames already embedded); emit it directly without appending (callargs). + # call_terms == None also signals the primary_fields verbatim path. + meos_call_str = op['meos_call'] + if call_terms is None or '(' in meos_call_str: + callexpr = meos_call_str + else: + callargs = ", ".join(call_terms) + callexpr = f"{meos_call_str}({callargs})" + bf = "".join(f" {x}\n" for x in box_frees) + + free_temp = "" if is_static else f" free(temp);\n" + + if extract_fn is None: + if is_static: + call_marshal = (f" {ret_cpp} r = {callexpr};\n" + f"{bf}" + f" return r;") + else: + call_marshal = (f" {ret_cpp} r = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" return r;") + else: + # Temporal*-returning transform: result is a single-instant temporal; take + # its value via the result type's *_start_value accessor, free both. + call_marshal = (f" Temporal* res = {callexpr};\n" + f"{free_temp}" + f"{bf}" + f" if (!res) return {zero};\n" + f" {ret_cpp} r = {extract_fn}(res);\n" + f" free(res);\n" + f" return r;") + + # physical-hpp/logical ctor args are PhysicalFunction/LogicalFunction per child. + physical_args = ",\n ".join( + f"PhysicalFunction {fn}Function" for fn, _ in fields) + pushes = "\n".join(f" parameterFunctions.push_back(std::move({fn}Function));" for fn, _ in fields) + registrar = "\n".join( + [f" auto arg{i} = std::move(arguments.childFunctions[{i}]);" for i in range(n_args)] + + [f" return {name}PhysicalFunction(" + ", ".join(f"std::move(arg{i})" for i in range(n_args)) + ");"]) + + return GENERIC_PHYSICAL_TEMPLATE.format( + nebula_name=name, includes=inc, + ctor_physical_args=physical_args, n_args=n_args, ctor_physical_pushes=pushes, + casts="\n".join(casts), lambda_params=",\n ".join(lparams), + return_type=ret_cpp, build=build, call_marshal=call_marshal, + zero=zero, invoke_args=", ".join(invoke), registrar_pushes=registrar) + + +GENERIC_PHYSICAL_TEMPLATE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +{includes} +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + +{casts} + + const auto result = nautilus::invoke( + +[]({lambda_params}) -> {return_type} {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); +{build} +{call_marshal} + }} + catch (const std::exception&) + {{ + return {zero}; + }} + }}, + {invoke_args}); + + return VarVal(result); +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +GENERIC_PHYSICAL_VARSIZED_TEMPLATE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +{includes} +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve({n_args}); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + +{casts} + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[]({lambda_params}) -> uint32_t {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); +{build} +{call_marshal} + }} + catch (const std::exception&) + {{ + return 0u; + }} + }}, + {invoke_args}); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == {n_args}, + "{nebula_name}PhysicalFunction requires {n_args} children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +GENERIC_PHYSICAL_WKB_TEMPLATE = """\ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" {{ +{includes} +}} + +namespace NES {{ + +{nebula_name}PhysicalFunction::{nebula_name}PhysicalFunction({ctor_physical_args}) +{{ + parameterFunctions.reserve(2); +{ctor_physical_pushes} +}} + +VarVal {nebula_name}PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + {{ + parameterValues.emplace_back(function.execute(record, arena)); + }} + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + {{ + try + {{ + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) {{ free(a); return (char*) nullptr; }} + Temporal* res = {meos_call}(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + }} + catch (const std::exception&) + {{ + return (char*) nullptr; + }} + }}, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t {{ return s ? (uint32_t) strlen(s) : (uint32_t) 0; }}, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + {{ + if (s) + {{ + memcpy(dest, s, len); + free((void*) s); + }} + }}, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +}} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::Register{nebula_name}PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{{ + PRECONDITION(arguments.childFunctions.size() == 2, + "{nebula_name}PhysicalFunction requires 2 children but got {{}}", + arguments.childFunctions.size()); +{registrar_pushes} +}} + +}} // namespace NES +""" + + +# =========================================================================== +# Parser-glue dispatch-case templates (one per shape). +# The shape is encoded by the build_* flag; the dispatch block produces a +# LogicalFunction ctor invocation matching the C++ operator's arg order. +# +# Mariana's existing TGEO_AT_STBOX and EDWITHIN_TGEO_GEO blocks are the +# in-tree reference for the constantBuilder→functionBuilder lift pattern. +# =========================================================================== + +# 4-arg shape: lon, lat, ts, geometry (geometry is the only constant — WKT). +DISPATCH_CASE_ONE_TEMPORAL_POINT = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("{sql_token} requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {{}}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + {{ + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + }} + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lon, lat, timestamp, geometry)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 6-arg shape: lonA, latA, tsA, lonB, latB, tsB (no constants). +DISPATCH_CASE_TWO_TEMPORAL_POINTS = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("{sql_token} requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {{}}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 8-arg shape: xA, yA, thetaA, tsA, xB, yB, thetaB, tsB — two tpose instants, +# each lifted to a tgeompoint via tpose_to_tpoint at run time (W15 composition). +DISPATCH_CASE_TWO_TPOSE_POINTS = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("{sql_token} requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {{}}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 5-arg shape: lon, lat, ts, geometry, dist (both geometry and dist are constants). +# Constant lift uses mariana's pattern: TRUE/FALSE → BOOLEAN, strtod-clean → FLOAT64, else → VARSIZED. +DISPATCH_CASE_ONE_TEMPORAL_POINT_WITH_DIST = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("{sql_token} requires exactly 5 arguments (lon, lat, timestamp, geometry, distance), but got {{}}", argCount); + + /* Lift constants (geometry + distance) — same shape as EDWITHIN_TGEO_GEO */ + while (!helpers.top().constantBuilder.empty()) + {{ + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + const auto upperValue = Util::toUpperCase(constantValue); + if (upperValue == "TRUE" || upperValue == "FALSE") + {{ + dataType = DataTypeProvider::provideDataType(DataType::Type::BOOLEAN); + }} + else + {{ + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + }} + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + }} + + /* After lift: [lon, lat, ts, distance, geometry] (geometry pushed last because lifted last in LIFO) */ + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lon, lat, timestamp, geometry, dist)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 7-arg shape: lonA, latA, tsA, lonB, latB, tsB, dist (only dist is constant). +DISPATCH_CASE_TWO_TEMPORAL_POINTS_WITH_DIST = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("{sql_token} requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {{}}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + {{ + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + }} + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + + +# 6-arg shape: lon, lat, radius, ts, geometry, dist — tcbuffer × static geom + dist. +DISPATCH_CASE_TCBUFFER_POINT_WITH_DIST = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("{sql_token} requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {{}}", argCount); + + while (!helpers.top().constantBuilder.empty()) + {{ + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + }} + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 9-arg shape: lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist — two tcbuffers + dist. +DISPATCH_CASE_TWO_TCBUFFER_POINTS_WITH_DIST = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("{sql_token} requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {{}}", argCount); + + while (!helpers.top().constantBuilder.empty()) + {{ + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + }} + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 8-arg shape: lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB (no constants). +DISPATCH_CASE_TWO_TCBUFFER_POINTS = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("{sql_token} requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {{}}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 5-arg shape: lon, lat, radius, ts, geometry — tcbuffer × static geom. +# Geometry is the only constant (lifted to FLOAT64 / VARSIZED via the same lift +# pattern as the existing with-dist templates). +DISPATCH_CASE_TCBUFFER_POINT = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("{sql_token} requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {{}}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + {{ + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + }} + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(lon, lat, radius, timestamp, geometry)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 3-arg shape: value, ts, scalar (scalar may be FLOAT64 or INT32, only one constant). +DISPATCH_CASE_TNUMBER_POINT_WITH_SCALAR = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("{sql_token} requires exactly 3 arguments (value, timestamp, scalar), but got {{}}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + {{ + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + }} + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(value, timestamp, scalar)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 4-arg shape: valueA, tsA, valueB, tsB (no constants). +DISPATCH_CASE_TWO_TNUMBER_POINTS = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("{sql_token} requires exactly 4 arguments (valueA, tsA, valueB, tsB), but got {{}}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto valueB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto valueA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(valueA, tsA, valueB, tsB)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 2-arg shape: two VariableSizedData blobs (stbox+stbox, traj+traj, etc.) +DISPATCH_CASE_TWO_VARIABLESIZED = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("{sql_token} requires exactly 2 arguments (arg0, arg1), but got {{}}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + {{ + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + }} + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(arg0, arg1)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + +# 2-arg shape: bool value + uint64_t timestamp (tbool instant). +DISPATCH_CASE_TBOOL_POINT = """\ + /* BEGIN CODEGEN PARSER GLUE: {sql_token} */ + case AntlrSQLLexer::{sql_token}: + {{ + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("{sql_token} requires exactly 2 arguments (value, timestamp), but got {{}}", argCount); + + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + {nebula_name}LogicalFunction(value, timestamp)); + }} + break; + /* END CODEGEN PARSER GLUE: {sql_token} */ +""" + + +def dispatch_case_for(op): + """Pick the dispatch-case template that matches an operator's shape.""" + if op.get("build_two_temporal_points_with_dist"): + return DISPATCH_CASE_TWO_TEMPORAL_POINTS_WITH_DIST + if op.get("build_temporal_point_with_dist"): + return DISPATCH_CASE_ONE_TEMPORAL_POINT_WITH_DIST + if op.get("build_two_temporal_points"): + return DISPATCH_CASE_TWO_TEMPORAL_POINTS + if op.get("build_two_tpose_points_via_composition"): + return DISPATCH_CASE_TWO_TPOSE_POINTS + if op.get("build_tnpoint_point_via_composition"): + # 4-arg SQL shape (rid, fraction, ts, geometry) — same arity as a + # one-temporal-point op; the parser only pops/forwards by arity. + return DISPATCH_CASE_ONE_TEMPORAL_POINT + if op.get("build_two_tnpoint_points_via_composition"): + # 6-arg SQL shape (ridA, fracA, tsA, ridB, fracB, tsB) — same arity + # as a two-temporal-points op. + return DISPATCH_CASE_TWO_TEMPORAL_POINTS + # dwithin (W20): the with-dist composition shapes reuse existing with-dist + # dispatches by arity + constant pattern (geometry+dist or dist-only lifted). + if op.get("build_tpose_point_with_dist_via_composition"): + # 6-arg: x, y, theta, ts (cols) + geometry, dist (constants) — same + # shape as tcbuffer × geom + dist. + return DISPATCH_CASE_TCBUFFER_POINT_WITH_DIST + if op.get("build_two_tpose_points_with_dist_via_composition"): + # 9-arg: 8 cols + dist constant — same shape as two-tcbuffer + dist. + return DISPATCH_CASE_TWO_TCBUFFER_POINTS_WITH_DIST + if op.get("build_tnpoint_point_with_dist_via_composition"): + # 5-arg: rid, fraction, ts (cols) + geometry, dist (constants). + return DISPATCH_CASE_ONE_TEMPORAL_POINT_WITH_DIST + if op.get("build_two_tnpoint_points_with_dist_via_composition"): + # 7-arg: 6 cols + dist constant. + return DISPATCH_CASE_TWO_TEMPORAL_POINTS_WITH_DIST + if op.get("build_temporal_point") or op.get("build_temporal_point_restriction"): + # Both shapes share the same 4-arg dispatch (lon, lat, ts, geom); + # only the physical-cpp body differs (filter-predicate int return vs. + # restriction-survival int return). + return DISPATCH_CASE_ONE_TEMPORAL_POINT + if op.get("build_tcbuffer_point") or op.get("build_tcbuffer_point_cbuffer") \ + or op.get("build_tpose_point_via_composition"): + # All three shapes share the same 5-arg dispatch (lon/x, lat/y, radius/theta, ts, blob); + # only the physical-cpp body differs (blob parsed as GSERIALIZED vs Cbuffer; per-event + # type construction is tcbuffer vs tpose with optional tpose_to_tpoint composition). + return DISPATCH_CASE_TCBUFFER_POINT + if op.get("build_two_tcbuffer_points"): + return DISPATCH_CASE_TWO_TCBUFFER_POINTS + if op.get("build_tcbuffer_point_with_dist") or op.get("build_tcbuffer_point_cbuffer_with_dist"): + # Same 6-arg SQL dispatch for both — only physical-cpp body differs (blob parser). + return DISPATCH_CASE_TCBUFFER_POINT_WITH_DIST + if op.get("build_two_tcbuffer_points_with_dist"): + return DISPATCH_CASE_TWO_TCBUFFER_POINTS_WITH_DIST + if op.get("build_tnumber_point_with_scalar") or op.get("build_tnumber_scalar_first"): + # scalar-first reuses the same 3-arg (value, ts, scalar) SQL dispatch; + # only the physical-cpp body differs (MEOS call arg order). + return DISPATCH_CASE_TNUMBER_POINT_WITH_SCALAR + if op.get("build_two_tnumber_points") or op.get("build_two_tnumber_sep_ts"): + # sep-ts variant uses separate tsA/tsB — same 4-arg SQL dispatch shape. + return DISPATCH_CASE_TWO_TNUMBER_POINTS + # stbox/tspatial and tspatial/stbox: 4 args (lon, lat, ts, box_blob) — + # same arity as ONE_TEMPORAL_POINT (lon, lat, timestamp, geometry). + if op.get("build_stbox_tspatial") or op.get("build_tspatial_stbox"): + return DISPATCH_CASE_ONE_TEMPORAL_POINT + # tbox/tnumber and tnumber/tbox: 3 args (value, ts, box_blob) — + # same arity as TNUMBER_POINT_WITH_SCALAR (value, timestamp, scalar). + if op.get("build_tbox_tnumber") or op.get("build_tnumber_tbox"): + return DISPATCH_CASE_TNUMBER_POINT_WITH_SCALAR + # stbox+stbox and tnumber+tnumber (hexwkb): 2 VariableSizedData blobs. + if op.get("build_stbox_stbox") or op.get("build_tnumber_tnumber_wkb"): + return DISPATCH_CASE_TWO_VARIABLESIZED + # tbool instant: 2 args (bool value, uint64_t timestamp). + if op.get("build_tbool_point"): + return DISPATCH_CASE_TBOOL_POINT + return None + + +def _dispatch_case_current(op): + """Parser dispatch case in the CURRENT AntlrSQLParser style (visit()/return + LogicalFunction), matching the live W2..W147 chain. Generic over arity. + Returns the final C++ string (no further .format). END marker only (the + live style carries no BEGIN marker).""" + build_key = next((k for k in _TRGEO_PHYS_DISPATCH if op.get(k)), None) + n = len(_TRGEO_PHYS_DISPATCH[build_key][1]) if build_key else len(op.get("args", [])) + tok, name = op["sql_token"], op["nebula_name"] + visits = "\n".join( + f" auto arg{i} = visit(ctx->functionParam({i})).as();" + for i in range(n)) + ctor_args = ", ".join(f"std::move(arg{i})" for i in range(n)) + return f""" case AntlrSQLParser::{tok}: {{ + PRECONDITION(ctx->functionParam().size() == {n}, + "{name} requires {n} args but got {{}}", + ctx->functionParam().size()); +{visits} + return LogicalFunction({name}LogicalFunction({ctor_args})); + }} + /* END CODEGEN PARSER GLUE: {tok} */""" + + +def _generic_dispatch_case(op): + """Parser dispatch case for a 'generic' operator. Arity is baked in (n = + number of event fields); lifts string/number constants (geometry blobs, + scalars) then pops n children in reverse and builds the LogicalFunction. + Returns the final C++ string (no further .format).""" + n = len(op["args"]) + tok, name = op["sql_token"], op["nebula_name"] + pops = "\n".join( + f" auto a{i} = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back();" + for i in range(n - 1, -1, -1)) + ctor_args = ", ".join(f"a{i}" for i in range(n)) + return f""" /* BEGIN CODEGEN PARSER GLUE: {tok} */ + case AntlrSQLLexer::{tok}: + {{ + const auto argCount = context->expression().size(); + if (argCount != {n}) + throw InvalidQuerySyntax("{tok} requires exactly {n} arguments, but got {{}}", argCount); + + while (!helpers.top().constantBuilder.empty()) + {{ + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + }} + +{pops} + + helpers.top().functionBuilder.emplace_back({name}LogicalFunction({ctor_args})); + }} + break; + /* END CODEGEN PARSER GLUE: {tok} */ +""" + + +# =========================================================================== +# Idempotent injectors — each scans for a per-op marker and inserts only +# if not present, so re-runs are safe. +# =========================================================================== + +def inject_cmake_entries(operators, output_root: Path) -> int: + """Append per-op `add_plugin(...)` entries to the Meos CMakeLists files + (logical + physical layers). Idempotent: skips ops already listed.""" + n_added = 0 + for layer in ("logical", "physical"): + cml = output_root / f"nes-{layer}-operators/src/Functions/Meos/CMakeLists.txt" + if not cml.exists(): + sys.stderr.write(f" ! cmake-entries: {cml} not found, skipping {layer} layer\n") + continue + body = cml.read_text() + layer_suffix = "Logical" if layer == "logical" else "Physical" + new_lines = [] + for op in operators: + entry = ( + f"add_plugin({op['nebula_name']} {layer_suffix}Function " + f"nes-{layer}-operators {op['nebula_name']}{layer_suffix}Function.cpp)" + ) + if entry in body or f"add_plugin({op['nebula_name']} {layer_suffix}Function" in body: + continue + new_lines.append(entry) + if new_lines: + block = "\n".join(new_lines) + "\n" + # The physical Meos CMakeLists wraps its add_plugin calls in + # `if(NES_ENABLE_MEOS) ... endif()`; new entries MUST land inside the + # guard (before the final endif) so they inherit the MEOS plugin + # include dir that provides MEOSWrapper.hpp. The logical layer has no + # guard, so it appends at EOF. + idx = body.rfind("\nendif()") + if idx != -1: + insert_at = idx + 1 # just before the final `endif()` line + body = body[:insert_at] + block + body[insert_at:] + cml.write_text(body) + else: + with cml.open("a") as f: + f.write(block) + sys.stderr.write(f" ✓ cmake-entries ({layer}): added {len(new_lines)} entry(ies)\n") + n_added += len(new_lines) + return n_added + + +def inject_g4(operators, g4_path: Path) -> int: + """Inject lexer-token + functionName-alternation entries into AntlrSQL.g4. + Idempotent: skips tokens already present.""" + if not g4_path.exists(): + sys.stderr.write(f" ! g4: {g4_path} not found, skipping\n") + return 0 + body = g4_path.read_text() + n_added = 0 + + # 1) Lexer-token entries — insert just before the WATERMARK: lexer token. + new_tokens = [] + for op in operators: + tok = op["sql_token"] + if re.search(rf"^{re.escape(tok)}\s*:", body, re.MULTILINE): + continue + new_tokens.append( + f"{tok}: '{tok}' | '{tok.lower()}';" + ) + if new_tokens: + anchor_re = re.compile(r"^WATERMARK:.*$", re.MULTILINE) + m = anchor_re.search(body) + if m is None: + sys.stderr.write(f" ! g4: WATERMARK lexer anchor not found; cannot inject tokens\n") + else: + insertion = "/* BEGIN CODEGEN LEXER TOKENS */\n" + "\n".join(new_tokens) + "\n/* END CODEGEN LEXER TOKENS */\n" + # If the BEGIN marker already exists, append inside that block; else insert before WATERMARK. + if "/* BEGIN CODEGEN LEXER TOKENS */" in body: + body = re.sub( + r"(/\* BEGIN CODEGEN LEXER TOKENS \*/\n)(.*?)(/\* END CODEGEN LEXER TOKENS \*/)", + lambda mm: mm.group(1) + mm.group(2) + "\n".join(new_tokens) + "\n" + mm.group(3), + body, + count=1, + flags=re.DOTALL, + ) + else: + body = body[: m.start()] + insertion + body[m.start():] + n_added += len(new_tokens) + sys.stderr.write(f" ✓ g4 lexer-tokens: added {len(new_tokens)} token(s)\n") + + # 2) functionName: alternation — append missing tokens before the trailing ';'. + fn_re = re.compile(r"^functionName:\s*([^;]+);", re.MULTILINE) + m = fn_re.search(body) + if m is None: + sys.stderr.write(f" ! g4: functionName production not found\n") + else: + alternation = m.group(1) + new_alts = [] + for op in operators: + tok = op["sql_token"] + if re.search(rf"\b{re.escape(tok)}\b", alternation): + continue + new_alts.append(tok) + if new_alts: + new_alt_text = alternation.rstrip() + " | " + " | ".join(new_alts) + body = body[: m.start()] + f"functionName: {new_alt_text};" + body[m.end():] + sys.stderr.write(f" ✓ g4 functionName: added {len(new_alts)} alternative(s)\n") + + g4_path.write_text(body) + return n_added + + +def inject_parser_cpp(operators, cpp_path: Path) -> int: + """Inject #include + dispatch-case block into AntlrSQLQueryPlanCreator.cpp. + Idempotent: skips when the per-op BEGIN marker is already present.""" + if not cpp_path.exists(): + sys.stderr.write(f" ! parser-cpp: {cpp_path} not found, skipping\n") + return 0 + body = cpp_path.read_text() + n_added = 0 + + # 1) Per-op #include — append after the last existing Meos LogicalFunction include. + new_includes = [] + for op in operators: + inc = f"#include " + if inc in body: + continue + new_includes.append(inc) + if new_includes: + # Insert immediately after the last #include line. + meos_inc_re = re.compile(r"(^#include ]+>\s*\n)+", re.MULTILINE) + matches = list(meos_inc_re.finditer(body)) + if not matches: + sys.stderr.write(f" ! parser-cpp: could not find Meos include anchor\n") + else: + last = matches[-1] + body = body[: last.end()] + "\n".join(new_includes) + "\n" + body[last.end():] + sys.stderr.write(f" ✓ parser-cpp includes: added {len(new_includes)}\n") + + # 2) Per-op dispatch cases — insert just before the `default:` of the + # switch that already contains the TGEO_AT_STBOX case. + cases_block = [] + for op in operators: + marker = f"/* BEGIN CODEGEN PARSER GLUE: {op['sql_token']} */" + end_marker = f"/* END CODEGEN PARSER GLUE: {op['sql_token']} */" + if marker in body or end_marker in body: + continue + # Also skip if a pre-existing hand-written case for this token already + # exists (no marker, but a `case AntlrSQL{Lexer,Parser}::TOKEN:` line is present). + if re.search(rf"case\s+AntlrSQL(?:Lexer|Parser)::{re.escape(op['sql_token'])}\s*:", body): + sys.stderr.write( + f" ! parser-cpp: pre-existing hand-written case for {op['sql_token']} detected; " + f"skipping codegen injection (will not duplicate)\n" + ) + continue + if any(op.get(k) for k in _TRGEO_PHYS_DISPATCH): + case_str = _dispatch_case_current(op) # current AntlrSQLParser style; final string + elif op.get("build_generic"): + case_str = _generic_dispatch_case(op) # arity baked in; final string + else: + tmpl = dispatch_case_for(op) + if tmpl is None: + sys.stderr.write(f" ! parser-cpp: {op['nebula_name']} has no dispatch shape, skipping case\n") + continue + case_str = tmpl.format(sql_token=op["sql_token"], nebula_name=op["nebula_name"]) + cases_block.append(case_str) + n_added += 1 + if cases_block: + # Find the insertion point: prefer just after the LAST existing + # `/* END CODEGEN PARSER GLUE: ... */` marker (so successive codegen + # runs cluster their cases), else fall back to inserting before the + # `default:` that immediately follows the TGEO_AT_STBOX case block. + last_end_re = re.compile(r"/\* END CODEGEN PARSER GLUE: [^*]+\*/") + ends = list(last_end_re.finditer(body)) + if ends: + insert_at = ends[-1].end() + body = body[:insert_at] + "\n" + "\n".join(cases_block) + body[insert_at:] + sys.stderr.write(f" ✓ parser-cpp dispatch: added {len(cases_block)} case(s) after last codegen marker\n") + else: + anchor_re = re.compile( + r"(case AntlrSQLLexer::TGEO_AT_STBOX:[\s\S]+?\n\s*break;\n)(\s*default:)", + ) + m = anchor_re.search(body) + if m is None: + sys.stderr.write(f" ! parser-cpp: no anchor (TGEO_AT_STBOX→default or codegen END marker) found\n") + else: + insertion = m.group(1) + "\n" + "\n".join(cases_block) + "\n" + m.group(2) + body = body[: m.start()] + insertion + body[m.end():] + sys.stderr.write(f" ✓ parser-cpp dispatch: added {len(cases_block)} case(s) before default:\n") + + cpp_path.write_text(body) + return n_added + + +def main(): + parser = argparse.ArgumentParser() + parser.add_argument("--input", required=True, help="Path to JSON descriptor file") + parser.add_argument("--output-root", required=True, help="MobilityNebula repo root") + parser.add_argument("--no-parser-glue", action="store_true", + help="Skip .g4 + parser .cpp injection (default: inject)") + parser.add_argument("--no-cmake-entries", action="store_true", + help="Skip CMakeLists.txt injection (default: inject)") + args = parser.parse_args() + + with open(args.input) as f: + config = json.load(f) + + output_root = Path(args.output_root).resolve() + if not (output_root / "nes-logical-operators").exists(): + sys.exit(f"ERROR: {output_root} does not look like a MobilityNebula root (no nes-logical-operators/)") + + operators = config["operators"] + sys.stderr.write(f"Emitting {len(operators)} operator(s):\n\n") + for op in operators: + emit_operator(op, output_root) + + if not args.no_cmake_entries: + sys.stderr.write("\nCMakeLists.txt:\n") + inject_cmake_entries(operators, output_root) + + if not args.no_parser_glue: + sys.stderr.write("\nParser glue:\n") + inject_g4(operators, output_root / "nes-sql-parser/AntlrSQL.g4") + inject_parser_cpp(operators, output_root / "nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp") + + sys.stderr.write( + f"\nDone. {len(operators) * 4} files emitted " + f"(or 3 + .cpp-skipped for shapes without a physical-cpp template).\n" + ) + + +if __name__ == "__main__": + main() diff --git a/tools/codegen/gen_all.py b/tools/codegen/gen_all.py new file mode 100644 index 0000000000..597cb8d06e --- /dev/null +++ b/tools/codegen/gen_all.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +"""gen_all.py — regenerate the full per-event MobilityNebula surface from all descriptors in one run.""" +import sys +import json +import argparse +from pathlib import Path + +# Add nebula-generator dir to path so we can import codegen_nebula +sys.path.insert(0, str(Path(__file__).parent)) +from codegen_nebula import emit_operator, inject_cmake_entries, inject_g4, inject_parser_cpp + +DESCRIPTORS = [ + # ordered: smallest first, composed last + ("tfloat-transforms", "tfloat-transforms-descriptor.json"), + ("numeric", "numeric-descriptor.json"), + ("spatial-predicates", "spatial-predicates-descriptor.json"), + ("spatial-phasec-full", "spatial-phasec-full-descriptor.json"), + ("phasec-rest", "phasec-rest-descriptor.json"), + ("trgeo", "trgeo-descriptor.json"), + ("phasec-composed", "phasec-composed-descriptor.json"), + ("missing-ops", "missing-ops-descriptor.json"), +] + + +def main(): + parser = argparse.ArgumentParser( + description="Regenerate the full per-event MobilityNebula surface from all descriptors" + ) + parser.add_argument("--output-root", required=True, help="MobilityNebula repo root") + args = parser.parse_args() + + output_root = Path(args.output_root).resolve() + if not (output_root / "nes-logical-operators").exists(): + sys.exit(f"ERROR: {output_root} does not look like a MobilityNebula root (missing nes-logical-operators/)") + + script_dir = Path(__file__).parent + grand_total = 0 + all_operators = [] + + for family_name, desc_file in DESCRIPTORS: + desc_path = script_dir / desc_file + if not desc_path.exists(): + sys.exit(f"ERROR: descriptor not found: {desc_path}") + with open(desc_path) as f: + config = json.load(f) + operators = config["operators"] + sys.stderr.write(f" {family_name}: {len(operators)} operators\n") + for op in operators: + emit_operator(op, output_root) + all_operators.extend(operators) + grand_total += len(operators) + + sys.stderr.write(f"\nCMakeLists.txt injection:\n") + inject_cmake_entries(all_operators, output_root) + + sys.stderr.write(f"\nParser glue injection:\n") + inject_g4(all_operators, output_root / "nes-sql-parser/AntlrSQL.g4") + inject_parser_cpp(all_operators, output_root / "nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp") + + sys.stderr.write(f"\nDone. {grand_total} operators regenerated.\n") + + +if __name__ == "__main__": + main() diff --git a/tools/codegen/missing-ops-descriptor.json b/tools/codegen/missing-ops-descriptor.json new file mode 100644 index 0000000000..60f72f8ea7 --- /dev/null +++ b/tools/codegen/missing-ops-descriptor.json @@ -0,0 +1,9789 @@ +{ + "_comment": "Missing ops descriptor: 303 new operators spanning stbox/stbox, stbox/tspatial, tspatial/stbox, tbox/tnumber, tnumber/tbox, tnumber/tnumber (wkb), tbool, temporal/temporal, tcbuffer, and related families.", + "operators": [ + { + "nebula_name": "AboveStboxStbox", + "sql_token": "ABOVESTBOXSTBOX", + "meos_call": "above_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event above_stbox_stbox predicate." + }, + { + "nebula_name": "AdjacentStboxStbox", + "sql_token": "ADJACENTSTBOXSTBOX", + "meos_call": "adjacent_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event adjacent_stbox_stbox predicate." + }, + { + "nebula_name": "AfterStboxStbox", + "sql_token": "AFTERSTBOXSTBOX", + "meos_call": "after_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event after_stbox_stbox predicate." + }, + { + "nebula_name": "BackStboxStbox", + "sql_token": "BACKSTBOXSTBOX", + "meos_call": "back_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event back_stbox_stbox predicate." + }, + { + "nebula_name": "BeforeStboxStbox", + "sql_token": "BEFORESTBOXSTBOX", + "meos_call": "before_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event before_stbox_stbox predicate." + }, + { + "nebula_name": "BelowStboxStbox", + "sql_token": "BELOWSTBOXSTBOX", + "meos_call": "below_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event below_stbox_stbox predicate." + }, + { + "nebula_name": "ContainedStboxStbox", + "sql_token": "CONTAINEDSTBOXSTBOX", + "meos_call": "contained_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event contained_stbox_stbox predicate." + }, + { + "nebula_name": "ContainsStboxStbox", + "sql_token": "CONTAINSSTBOXSTBOX", + "meos_call": "contains_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event contains_stbox_stbox predicate." + }, + { + "nebula_name": "FrontStboxStbox", + "sql_token": "FRONTSTBOXSTBOX", + "meos_call": "front_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event front_stbox_stbox predicate." + }, + { + "nebula_name": "LeftStboxStbox", + "sql_token": "LEFTSTBOXSTBOX", + "meos_call": "left_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event left_stbox_stbox predicate." + }, + { + "nebula_name": "OveraboveStboxStbox", + "sql_token": "OVERABOVESTBOXSTBOX", + "meos_call": "overabove_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overabove_stbox_stbox predicate." + }, + { + "nebula_name": "OverafterStboxStbox", + "sql_token": "OVERAFTERSTBOXSTBOX", + "meos_call": "overafter_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overafter_stbox_stbox predicate." + }, + { + "nebula_name": "OverbackStboxStbox", + "sql_token": "OVERBACKSTBOXSTBOX", + "meos_call": "overback_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overback_stbox_stbox predicate." + }, + { + "nebula_name": "OverbeforeStboxStbox", + "sql_token": "OVERBEFORESTBOXSTBOX", + "meos_call": "overbefore_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overbefore_stbox_stbox predicate." + }, + { + "nebula_name": "OverbelowStboxStbox", + "sql_token": "OVERBELOWSTBOXSTBOX", + "meos_call": "overbelow_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overbelow_stbox_stbox predicate." + }, + { + "nebula_name": "OverfrontStboxStbox", + "sql_token": "OVERFRONTSTBOXSTBOX", + "meos_call": "overfront_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overfront_stbox_stbox predicate." + }, + { + "nebula_name": "OverlapsStboxStbox", + "sql_token": "OVERLAPSSTBOXSTBOX", + "meos_call": "overlaps_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overlaps_stbox_stbox predicate." + }, + { + "nebula_name": "OverleftStboxStbox", + "sql_token": "OVERLEFTSTBOXSTBOX", + "meos_call": "overleft_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overleft_stbox_stbox predicate." + }, + { + "nebula_name": "OverrightStboxStbox", + "sql_token": "OVERRIGHTSTBOXSTBOX", + "meos_call": "overright_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event overright_stbox_stbox predicate." + }, + { + "nebula_name": "RightStboxStbox", + "sql_token": "RIGHTSTBOXSTBOX", + "meos_call": "right_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event right_stbox_stbox predicate." + }, + { + "nebula_name": "SameStboxStbox", + "sql_token": "SAMESTBOXSTBOX", + "meos_call": "same_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event same_stbox_stbox predicate." + }, + { + "nebula_name": "StboxEq", + "sql_token": "STBOXEQ", + "meos_call": "stbox_eq", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_eq predicate." + }, + { + "nebula_name": "StboxGe", + "sql_token": "STBOXGE", + "meos_call": "stbox_ge", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_ge predicate." + }, + { + "nebula_name": "StboxGt", + "sql_token": "STBOXGT", + "meos_call": "stbox_gt", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_gt predicate." + }, + { + "nebula_name": "StboxLe", + "sql_token": "STBOXLE", + "meos_call": "stbox_le", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_le predicate." + }, + { + "nebula_name": "StboxLt", + "sql_token": "STBOXLT", + "meos_call": "stbox_lt", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_lt predicate." + }, + { + "nebula_name": "StboxNe", + "sql_token": "STBOXNE", + "meos_call": "stbox_ne", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_ne predicate." + }, + { + "nebula_name": "NadStboxStbox", + "sql_token": "NAD_STBOX_STBOX", + "meos_call": "nad_stbox_stbox", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "zero_return": "0.0", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event nad_stbox_stbox distance." + }, + { + "nebula_name": "StboxCmp", + "sql_token": "STBOX_CMP", + "meos_call": "stbox_cmp", + "args": [ + { + "name": "box", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "zero_return": "0", + "build_stbox_stbox": true, + "comment_one_liner": "Per-event stbox_cmp comparison." + }, + { + "nebula_name": "AboveStboxTspatial", + "sql_token": "ABOVESTBOXTSPATIAL", + "meos_call": "above_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event above_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "AdjacentStboxTspatial", + "sql_token": "ADJACENTSTBOXTSPATIAL", + "meos_call": "adjacent_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event adjacent_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "AfterStboxTspatial", + "sql_token": "AFTERSTBOXTSPATIAL", + "meos_call": "after_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event after_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "BackStboxTspatial", + "sql_token": "BACKSTBOXTSPATIAL", + "meos_call": "back_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event back_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "BeforeStboxTspatial", + "sql_token": "BEFORESTBOXTSPATIAL", + "meos_call": "before_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event before_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "BelowStboxTspatial", + "sql_token": "BELOWSTBOXTSPATIAL", + "meos_call": "below_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event below_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "ContainedStboxTspatial", + "sql_token": "CONTAINEDSTBOXTSPATIAL", + "meos_call": "contained_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event contained_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "ContainsStboxTspatial", + "sql_token": "CONTAINSSTBOXTSPATIAL", + "meos_call": "contains_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event contains_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "FrontStboxTspatial", + "sql_token": "FRONTSTBOXTSPATIAL", + "meos_call": "front_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event front_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "LeftStboxTspatial", + "sql_token": "LEFTSTBOXTSPATIAL", + "meos_call": "left_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event left_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OveraboveStboxTspatial", + "sql_token": "OVERABOVESTBOXTSPATIAL", + "meos_call": "overabove_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overabove_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverafterStboxTspatial", + "sql_token": "OVERAFTERSTBOXTSPATIAL", + "meos_call": "overafter_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overafter_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverbackStboxTspatial", + "sql_token": "OVERBACKSTBOXTSPATIAL", + "meos_call": "overback_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overback_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverbeforeStboxTspatial", + "sql_token": "OVERBEFORESTBOXTSPATIAL", + "meos_call": "overbefore_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overbefore_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverbelowStboxTspatial", + "sql_token": "OVERBELOWSTBOXTSPATIAL", + "meos_call": "overbelow_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overbelow_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverfrontStboxTspatial", + "sql_token": "OVERFRONTSTBOXTSPATIAL", + "meos_call": "overfront_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overfront_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverlapsStboxTspatial", + "sql_token": "OVERLAPSSTBOXTSPATIAL", + "meos_call": "overlaps_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overlaps_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverleftStboxTspatial", + "sql_token": "OVERLEFTSTBOXTSPATIAL", + "meos_call": "overleft_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overleft_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "OverrightStboxTspatial", + "sql_token": "OVERRIGHTSTBOXTSPATIAL", + "meos_call": "overright_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event overright_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "RightStboxTspatial", + "sql_token": "RIGHTSTBOXTSPATIAL", + "meos_call": "right_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event right_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "SameStboxTspatial", + "sql_token": "SAMESTBOXTSPATIAL", + "meos_call": "same_stbox_tspatial", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_stbox_tspatial": true, + "comment_one_liner": "Per-event same_stbox_tspatial predicate (stbox first)." + }, + { + "nebula_name": "AboveTspatialStbox", + "sql_token": "ABOVETSPATIALSTBOX", + "meos_call": "above_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event above_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "AdjacentTspatialStbox", + "sql_token": "ADJACENTTSPATIALSTBOX", + "meos_call": "adjacent_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event adjacent_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "AfterTspatialStbox", + "sql_token": "AFTERTSPATIALSTBOX", + "meos_call": "after_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event after_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "BackTspatialStbox", + "sql_token": "BACKTSPATIALSTBOX", + "meos_call": "back_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event back_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "BeforeTspatialStbox", + "sql_token": "BEFORETSPATIALSTBOX", + "meos_call": "before_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event before_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "BelowTspatialStbox", + "sql_token": "BELOWTSPATIALSTBOX", + "meos_call": "below_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event below_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "ContainedTspatialStbox", + "sql_token": "CONTAINEDTSPATIALSTBOX", + "meos_call": "contained_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event contained_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "ContainsTspatialStbox", + "sql_token": "CONTAINSTSPATIALSTBOX", + "meos_call": "contains_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event contains_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "FrontTspatialStbox", + "sql_token": "FRONTTSPATIALSTBOX", + "meos_call": "front_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event front_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "LeftTspatialStbox", + "sql_token": "LEFTTSPATIALSTBOX", + "meos_call": "left_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event left_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OveraboveTspatialStbox", + "sql_token": "OVERABOVETSPATIALSTBOX", + "meos_call": "overabove_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overabove_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverafterTspatialStbox", + "sql_token": "OVERAFTERTSPATIALSTBOX", + "meos_call": "overafter_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overafter_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverbackTspatialStbox", + "sql_token": "OVERBACKTSPATIALSTBOX", + "meos_call": "overback_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overback_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverbeforeTspatialStbox", + "sql_token": "OVERBEFORETSPATIALSTBOX", + "meos_call": "overbefore_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overbefore_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverbelowTspatialStbox", + "sql_token": "OVERBELOWTSPATIALSTBOX", + "meos_call": "overbelow_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overbelow_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverfrontTspatialStbox", + "sql_token": "OVERFRONTTSPATIALSTBOX", + "meos_call": "overfront_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overfront_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverlapsTspatialStbox", + "sql_token": "OVERLAPSTSPATIALSTBOX", + "meos_call": "overlaps_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overlaps_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverleftTspatialStbox", + "sql_token": "OVERLEFTTSPATIALSTBOX", + "meos_call": "overleft_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overleft_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "OverrightTspatialStbox", + "sql_token": "OVERRIGHTTSPATIALSTBOX", + "meos_call": "overright_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event overright_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "RightTspatialStbox", + "sql_token": "RIGHTTSPATIALSTBOX", + "meos_call": "right_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event right_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "SameTspatialStbox", + "sql_token": "SAMETSPATIALSTBOX", + "meos_call": "same_tspatial_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event same_tspatial_stbox predicate (temporal first)." + }, + { + "nebula_name": "NadTgeoStbox", + "sql_token": "NAD_TGEO_STBOX", + "meos_call": "nad_tgeo_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "zero_return": "0.0", + "build_tspatial_stbox": true, + "comment_one_liner": "Per-event nad_tgeo_stbox distance." + }, + { + "nebula_name": "AdjacentTboxTnumber", + "sql_token": "ADJACENTTBOXTNUMBER", + "meos_call": "adjacent_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event adjacent_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "AfterTboxTnumber", + "sql_token": "AFTERTBOXTNUMBER", + "meos_call": "after_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event after_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "BeforeTboxTnumber", + "sql_token": "BEFORETBOXTNUMBER", + "meos_call": "before_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event before_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "ContainedTboxTnumber", + "sql_token": "CONTAINEDTBOXTNUMBER", + "meos_call": "contained_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event contained_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "ContainsTboxTnumber", + "sql_token": "CONTAINSTBOXTNUMBER", + "meos_call": "contains_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event contains_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "LeftTboxTnumber", + "sql_token": "LEFTTBOXTNUMBER", + "meos_call": "left_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event left_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "OverafterTboxTnumber", + "sql_token": "OVERAFTERTBOXTNUMBER", + "meos_call": "overafter_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event overafter_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "OverbeforeTboxTnumber", + "sql_token": "OVERBEFORETBOXTNUMBER", + "meos_call": "overbefore_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event overbefore_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "OverlapsTboxTnumber", + "sql_token": "OVERLAPSTBOXTNUMBER", + "meos_call": "overlaps_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event overlaps_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "OverleftTboxTnumber", + "sql_token": "OVERLEFTTBOXTNUMBER", + "meos_call": "overleft_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event overleft_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "OverrightTboxTnumber", + "sql_token": "OVERRIGHTTBOXTNUMBER", + "meos_call": "overright_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event overright_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "RightTboxTnumber", + "sql_token": "RIGHTTBOXTNUMBER", + "meos_call": "right_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event right_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "SameTboxTnumber", + "sql_token": "SAMETBOXTNUMBER", + "meos_call": "same_tbox_tnumber", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbox_tnumber": true, + "comment_one_liner": "Per-event same_tbox_tnumber predicate (tbox first)." + }, + { + "nebula_name": "AdjacentTnumberTbox", + "sql_token": "ADJACENTTNUMBERTBOX", + "meos_call": "adjacent_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event adjacent_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "AfterTnumberTbox", + "sql_token": "AFTERTNUMBERTBOX", + "meos_call": "after_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event after_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "BeforeTnumberTbox", + "sql_token": "BEFORETNUMBERTBOX", + "meos_call": "before_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event before_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "ContainedTnumberTbox", + "sql_token": "CONTAINEDTNUMBERTBOX", + "meos_call": "contained_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event contained_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "ContainsTnumberTbox", + "sql_token": "CONTAINSTNUMBERTBOX", + "meos_call": "contains_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event contains_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "LeftTnumberTbox", + "sql_token": "LEFTTNUMBERTBOX", + "meos_call": "left_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event left_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "OverafterTnumberTbox", + "sql_token": "OVERAFTERTNUMBERTBOX", + "meos_call": "overafter_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event overafter_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "OverbeforeTnumberTbox", + "sql_token": "OVERBEFORETNUMBERTBOX", + "meos_call": "overbefore_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event overbefore_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "OverlapsTnumberTbox", + "sql_token": "OVERLAPSTNUMBERTBOX", + "meos_call": "overlaps_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event overlaps_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "OverleftTnumberTbox", + "sql_token": "OVERLEFTTNUMBERTBOX", + "meos_call": "overleft_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event overleft_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "OverrightTnumberTbox", + "sql_token": "OVERRIGHTTNUMBERTBOX", + "meos_call": "overright_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event overright_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "RightTnumberTbox", + "sql_token": "RIGHTTNUMBERTBOX", + "meos_call": "right_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event right_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "SameTnumberTbox", + "sql_token": "SAMETNUMBERTBOX", + "meos_call": "same_tnumber_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event same_tnumber_tbox predicate (temporal first)." + }, + { + "nebula_name": "NadTfloatTbox", + "sql_token": "NAD_TFLOAT_TBOX", + "meos_call": "nad_tfloat_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "zero_return": "0.0", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event nad_tfloat_tbox distance." + }, + { + "nebula_name": "NadTintTbox", + "sql_token": "NAD_TINT_TBOX", + "meos_call": "nad_tint_tbox", + "args": [ + { + "name": "value", + "nautilus_type": "int32_t", + "cpp_type": "int32_t" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "zero_return": "0", + "build_tnumber_tbox": true, + "tnumber_value_cpp_type": "int32_t", + "tnumber_in_fn": "tint_in", + "comment_one_liner": "Per-event nad_tint_tbox distance." + }, + { + "nebula_name": "AdjacentTnumberTnumber", + "sql_token": "ADJACENTTNUMBERTNUMBER", + "meos_call": "adjacent_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event adjacent_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "AfterTnumberTnumber", + "sql_token": "AFTERTNUMBERTNUMBER", + "meos_call": "after_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event after_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "BeforeTnumberTnumber", + "sql_token": "BEFORETNUMBERTNUMBER", + "meos_call": "before_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event before_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "ContainedTnumberTnumber", + "sql_token": "CONTAINEDTNUMBERTNUMBER", + "meos_call": "contained_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event contained_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "ContainsTnumberTnumber", + "sql_token": "CONTAINSTNUMBERTNUMBER", + "meos_call": "contains_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event contains_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "LeftTnumberTnumber", + "sql_token": "LEFTTNUMBERTNUMBER", + "meos_call": "left_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event left_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "OverafterTnumberTnumber", + "sql_token": "OVERAFTERTNUMBERTNUMBER", + "meos_call": "overafter_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event overafter_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "OverbeforeTnumberTnumber", + "sql_token": "OVERBEFORETNUMBERTNUMBER", + "meos_call": "overbefore_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event overbefore_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "OverlapsTnumberTnumber", + "sql_token": "OVERLAPSTNUMBERTNUMBER", + "meos_call": "overlaps_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event overlaps_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "OverleftTnumberTnumber", + "sql_token": "OVERLEFTTNUMBERTNUMBER", + "meos_call": "overleft_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event overleft_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "OverrightTnumberTnumber", + "sql_token": "OVERRIGHTTNUMBERTNUMBER", + "meos_call": "overright_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event overright_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "RightTnumberTnumber", + "sql_token": "RIGHTTNUMBERTNUMBER", + "meos_call": "right_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event right_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "SameTnumberTnumber", + "sql_token": "SAMETNUMBERTNUMBER", + "meos_call": "same_tnumber_tnumber", + "args": [ + { + "name": "traj", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "arg0", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tnumber_tnumber_wkb": true, + "comment_one_liner": "Per-event same_tnumber_tnumber predicate over hex-WKB pair." + }, + { + "nebula_name": "TboolEndValue", + "sql_token": "TBOOL_END_VALUE", + "meos_call": "tbool_end_value", + "args": [ + { + "name": "value", + "nautilus_type": "bool", + "cpp_type": "bool" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbool_point": true, + "comment_one_liner": "Per-event tbool_end_value." + }, + { + "nebula_name": "TboolStartValue", + "sql_token": "TBOOL_START_VALUE", + "meos_call": "tbool_start_value", + "args": [ + { + "name": "value", + "nautilus_type": "bool", + "cpp_type": "bool" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "zero_return": "false", + "build_tbool_point": true, + "comment_one_liner": "Per-event tbool_start_value." + }, + { + "nebula_name": "AboveTspatialTspatial", + "sql_token": "ABOVETSPATIALTSPATIAL", + "meos_call": "above_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event above_tspatial_tspatial predicate." + }, + { + "nebula_name": "AdjacentTspatialTspatial", + "sql_token": "ADJACENTTSPATIALTSPATIAL", + "meos_call": "adjacent_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event adjacent_tspatial_tspatial predicate." + }, + { + "nebula_name": "AfterTspatialTspatial", + "sql_token": "AFTERTSPATIALTSPATIAL", + "meos_call": "after_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event after_tspatial_tspatial predicate." + }, + { + "nebula_name": "BackTspatialTspatial", + "sql_token": "BACKTSPATIALTSPATIAL", + "meos_call": "back_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event back_tspatial_tspatial predicate." + }, + { + "nebula_name": "BeforeTspatialTspatial", + "sql_token": "BEFORETSPATIALTSPATIAL", + "meos_call": "before_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event before_tspatial_tspatial predicate." + }, + { + "nebula_name": "BelowTspatialTspatial", + "sql_token": "BELOWTSPATIALTSPATIAL", + "meos_call": "below_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event below_tspatial_tspatial predicate." + }, + { + "nebula_name": "ContainedTspatialTspatial", + "sql_token": "CONTAINEDTSPATIALTSPATIAL", + "meos_call": "contained_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event contained_tspatial_tspatial predicate." + }, + { + "nebula_name": "ContainsTspatialTspatial", + "sql_token": "CONTAINSTSPATIALTSPATIAL", + "meos_call": "contains_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event contains_tspatial_tspatial predicate." + }, + { + "nebula_name": "FrontTspatialTspatial", + "sql_token": "FRONTTSPATIALTSPATIAL", + "meos_call": "front_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event front_tspatial_tspatial predicate." + }, + { + "nebula_name": "LeftTspatialTspatial", + "sql_token": "LEFTTSPATIALTSPATIAL", + "meos_call": "left_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event left_tspatial_tspatial predicate." + }, + { + "nebula_name": "OveraboveTspatialTspatial", + "sql_token": "OVERABOVETSPATIALTSPATIAL", + "meos_call": "overabove_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overabove_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverafterTspatialTspatial", + "sql_token": "OVERAFTERTSPATIALTSPATIAL", + "meos_call": "overafter_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overafter_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverbackTspatialTspatial", + "sql_token": "OVERBACKTSPATIALTSPATIAL", + "meos_call": "overback_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overback_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverbeforeTspatialTspatial", + "sql_token": "OVERBEFORETSPATIALTSPATIAL", + "meos_call": "overbefore_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overbefore_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverbelowTspatialTspatial", + "sql_token": "OVERBELOWTSPATIALTSPATIAL", + "meos_call": "overbelow_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overbelow_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverfrontTspatialTspatial", + "sql_token": "OVERFRONTTSPATIALTSPATIAL", + "meos_call": "overfront_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overfront_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverlapsTspatialTspatial", + "sql_token": "OVERLAPSTSPATIALTSPATIAL", + "meos_call": "overlaps_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overlaps_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverleftTspatialTspatial", + "sql_token": "OVERLEFTTSPATIALTSPATIAL", + "meos_call": "overleft_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overleft_tspatial_tspatial predicate." + }, + { + "nebula_name": "OverrightTspatialTspatial", + "sql_token": "OVERRIGHTTSPATIALTSPATIAL", + "meos_call": "overright_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overright_tspatial_tspatial predicate." + }, + { + "nebula_name": "RightTspatialTspatial", + "sql_token": "RIGHTTSPATIALTSPATIAL", + "meos_call": "right_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event right_tspatial_tspatial predicate." + }, + { + "nebula_name": "SameTspatialTspatial", + "sql_token": "SAMETSPATIALTSPATIAL", + "meos_call": "same_tspatial_tspatial", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "bool", + "nautilus_return": "BOOLEAN", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event same_tspatial_tspatial predicate." + }, + { + "nebula_name": "AdjacentTemporalTemporal", + "sql_token": "ADJACENTTEMPORALTEMPORAL", + "meos_call": "adjacent_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event adjacent_temporal_temporal." + }, + { + "nebula_name": "AfterTemporalTemporal", + "sql_token": "AFTERTEMPORALTEMPORAL", + "meos_call": "after_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event after_temporal_temporal." + }, + { + "nebula_name": "BeforeTemporalTemporal", + "sql_token": "BEFORETEMPORALTEMPORAL", + "meos_call": "before_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event before_temporal_temporal." + }, + { + "nebula_name": "ContainedTemporalTemporal", + "sql_token": "CONTAINEDTEMPORALTEMPORAL", + "meos_call": "contained_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event contained_temporal_temporal." + }, + { + "nebula_name": "ContainsTemporalTemporal", + "sql_token": "CONTAINSTEMPORALTEMPORAL", + "meos_call": "contains_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event contains_temporal_temporal." + }, + { + "nebula_name": "OverafterTemporalTemporal", + "sql_token": "OVERAFTERTEMPORALTEMPORAL", + "meos_call": "overafter_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overafter_temporal_temporal." + }, + { + "nebula_name": "OverbeforeTemporalTemporal", + "sql_token": "OVERBEFORETEMPORALTEMPORAL", + "meos_call": "overbefore_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overbefore_temporal_temporal." + }, + { + "nebula_name": "OverlapsTemporalTemporal", + "sql_token": "OVERLAPSTEMPORALTEMPORAL", + "meos_call": "overlaps_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event overlaps_temporal_temporal." + }, + { + "nebula_name": "SameTemporalTemporal", + "sql_token": "SAMETEMPORALTEMPORAL", + "meos_call": "same_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event same_temporal_temporal." + }, + { + "nebula_name": "TemporalCmp", + "sql_token": "TEMPORALCMP", + "meos_call": "temporal_cmp", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_cmp." + }, + { + "nebula_name": "TemporalEq", + "sql_token": "TEMPORALEQ", + "meos_call": "temporal_eq", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_eq." + }, + { + "nebula_name": "TemporalGe", + "sql_token": "TEMPORALGE", + "meos_call": "temporal_ge", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_ge." + }, + { + "nebula_name": "TemporalGt", + "sql_token": "TEMPORALGT", + "meos_call": "temporal_gt", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_gt." + }, + { + "nebula_name": "TemporalLe", + "sql_token": "TEMPORALLE", + "meos_call": "temporal_le", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_le." + }, + { + "nebula_name": "TemporalLt", + "sql_token": "TEMPORALLT", + "meos_call": "temporal_lt", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_lt." + }, + { + "nebula_name": "TemporalNe", + "sql_token": "TEMPORALNE", + "meos_call": "temporal_ne", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_ne." + }, + { + "nebula_name": "AlwaysEqTemporalTemporal", + "sql_token": "ALWAYSEQTEMPORALTEMPORAL", + "meos_call": "always_eq_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_eq_temporal_temporal." + }, + { + "nebula_name": "AlwaysGeTemporalTemporal", + "sql_token": "ALWAYSGETEMPORALTEMPORAL", + "meos_call": "always_ge_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_ge_temporal_temporal." + }, + { + "nebula_name": "AlwaysGtTemporalTemporal", + "sql_token": "ALWAYSGTTEMPORALTEMPORAL", + "meos_call": "always_gt_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_gt_temporal_temporal." + }, + { + "nebula_name": "AlwaysLeTemporalTemporal", + "sql_token": "ALWAYSLETEMPORALTEMPORAL", + "meos_call": "always_le_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_le_temporal_temporal." + }, + { + "nebula_name": "AlwaysLtTemporalTemporal", + "sql_token": "ALWAYSLTTEMPORALTEMPORAL", + "meos_call": "always_lt_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_lt_temporal_temporal." + }, + { + "nebula_name": "AlwaysNeTemporalTemporal", + "sql_token": "ALWAYSNETEMPORALTEMPORAL", + "meos_call": "always_ne_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_ne_temporal_temporal." + }, + { + "nebula_name": "EverEqTemporalTemporal", + "sql_token": "EVEREQTEMPORALTEMPORAL", + "meos_call": "ever_eq_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_eq_temporal_temporal." + }, + { + "nebula_name": "EverGeTemporalTemporal", + "sql_token": "EVERGETEMPORALTEMPORAL", + "meos_call": "ever_ge_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_ge_temporal_temporal." + }, + { + "nebula_name": "EverGtTemporalTemporal", + "sql_token": "EVERGTTEMPORALTEMPORAL", + "meos_call": "ever_gt_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_gt_temporal_temporal." + }, + { + "nebula_name": "EverLeTemporalTemporal", + "sql_token": "EVERLETEMPORALTEMPORAL", + "meos_call": "ever_le_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_le_temporal_temporal." + }, + { + "nebula_name": "EverLtTemporalTemporal", + "sql_token": "EVERLTTEMPORALTEMPORAL", + "meos_call": "ever_lt_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_lt_temporal_temporal." + }, + { + "nebula_name": "EverNeTemporalTemporal", + "sql_token": "EVERNETEMPORALTEMPORAL", + "meos_call": "ever_ne_temporal_temporal", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_ne_temporal_temporal." + }, + { + "nebula_name": "TemporalFrechetDistance", + "sql_token": "TEMPORALFRECHETDISTANCE", + "meos_call": "temporal_frechet_distance", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_frechet_distance." + }, + { + "nebula_name": "TemporalHausdorffDistance", + "sql_token": "TEMPORALHAUSDORFFDISTANCE", + "meos_call": "temporal_hausdorff_distance", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_hausdorff_distance." + }, + { + "nebula_name": "TemporalDyntimewarpDistance", + "sql_token": "TEMPORALDYNTIMEWARPDISTANCE", + "meos_call": "temporal_dyntimewarp_distance", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event temporal_dyntimewarp_distance." + }, + { + "nebula_name": "TemporalNADTGeometry", + "sql_token": "TEMPORALNADTGEOMETRY", + "meos_call": "nad_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event nad_tgeo_tgeo." + }, + { + "nebula_name": "TemporalNADTFloat", + "sql_token": "TEMPORAL_NAD_TFLOAT", + "meos_call": "nad_tfloat_tfloat", + "args": [ + { + "name": "valueA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "valueB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "zero_return": "0.0", + "build_two_tnumber_sep_ts": true, + "tnumber_value_cpp_type": "double", + "tnumber_in_fn": "tfloat_in", + "comment_one_liner": "Per-event nad_tfloat_tfloat distance between two tfloat instants." + }, + { + "nebula_name": "TemporalNADTInt", + "sql_token": "TEMPORAL_NAD_TINT", + "meos_call": "nad_tint_tint", + "args": [ + { + "name": "valueA", + "nautilus_type": "int32_t", + "cpp_type": "int32_t" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "valueB", + "nautilus_type": "int32_t", + "cpp_type": "int32_t" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "zero_return": "0", + "build_two_tnumber_sep_ts": true, + "tnumber_value_cpp_type": "int32_t", + "tnumber_in_fn": "tint_in", + "comment_one_liner": "Per-event nad_tint_tint distance between two tint instants." + }, + { + "nebula_name": "AlwaysEqTfloatFloat", + "sql_token": "ALWAYSEQTFLOATFLOAT", + "meos_call": "always_eq_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event always_eq_tfloat_float." + }, + { + "nebula_name": "AlwaysGeTfloatFloat", + "sql_token": "ALWAYSGETFLOATFLOAT", + "meos_call": "always_ge_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event always_ge_tfloat_float." + }, + { + "nebula_name": "AlwaysGtTfloatFloat", + "sql_token": "ALWAYSGTTFLOATFLOAT", + "meos_call": "always_gt_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event always_gt_tfloat_float." + }, + { + "nebula_name": "AlwaysLeTfloatFloat", + "sql_token": "ALWAYSLETFLOATFLOAT", + "meos_call": "always_le_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event always_le_tfloat_float." + }, + { + "nebula_name": "AlwaysLtTfloatFloat", + "sql_token": "ALWAYSLTTFLOATFLOAT", + "meos_call": "always_lt_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event always_lt_tfloat_float." + }, + { + "nebula_name": "AlwaysNeTfloatFloat", + "sql_token": "ALWAYSNETFLOATFLOAT", + "meos_call": "always_ne_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event always_ne_tfloat_float." + }, + { + "nebula_name": "EverEqTfloatFloat", + "sql_token": "EVEREQTFLOATFLOAT", + "meos_call": "ever_eq_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event ever_eq_tfloat_float." + }, + { + "nebula_name": "EverGeTfloatFloat", + "sql_token": "EVERGETFLOATFLOAT", + "meos_call": "ever_ge_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event ever_ge_tfloat_float." + }, + { + "nebula_name": "EverGtTfloatFloat", + "sql_token": "EVERGTTFLOATFLOAT", + "meos_call": "ever_gt_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event ever_gt_tfloat_float." + }, + { + "nebula_name": "EverLeTfloatFloat", + "sql_token": "EVERLETFLOATFLOAT", + "meos_call": "ever_le_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event ever_le_tfloat_float." + }, + { + "nebula_name": "EverLtTfloatFloat", + "sql_token": "EVERLTTFLOATFLOAT", + "meos_call": "ever_lt_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event ever_lt_tfloat_float." + }, + { + "nebula_name": "EverNeTfloatFloat", + "sql_token": "EVERNETFLOATFLOAT", + "meos_call": "ever_ne_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event ever_ne_tfloat_float." + }, + { + "nebula_name": "AlwaysEqTintInt", + "sql_token": "ALWAYSEQTINTINT", + "meos_call": "always_eq_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event always_eq_tint_int." + }, + { + "nebula_name": "AlwaysGeTintInt", + "sql_token": "ALWAYSGETINTINT", + "meos_call": "always_ge_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event always_ge_tint_int." + }, + { + "nebula_name": "AlwaysGtTintInt", + "sql_token": "ALWAYSGTTINTINT", + "meos_call": "always_gt_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event always_gt_tint_int." + }, + { + "nebula_name": "AlwaysLeTintInt", + "sql_token": "ALWAYSLETINTINT", + "meos_call": "always_le_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event always_le_tint_int." + }, + { + "nebula_name": "AlwaysLtTintInt", + "sql_token": "ALWAYSLTTINTINT", + "meos_call": "always_lt_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event always_lt_tint_int." + }, + { + "nebula_name": "AlwaysNeTintInt", + "sql_token": "ALWAYSNETINTINT", + "meos_call": "always_ne_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event always_ne_tint_int." + }, + { + "nebula_name": "EverEqTintInt", + "sql_token": "EVEREQTINTINT", + "meos_call": "ever_eq_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event ever_eq_tint_int." + }, + { + "nebula_name": "EverGeTintInt", + "sql_token": "EVERGETINTINT", + "meos_call": "ever_ge_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event ever_ge_tint_int." + }, + { + "nebula_name": "EverGtTintInt", + "sql_token": "EVERGTTINTINT", + "meos_call": "ever_gt_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event ever_gt_tint_int." + }, + { + "nebula_name": "EverLeTintInt", + "sql_token": "EVERLETINTINT", + "meos_call": "ever_le_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event ever_le_tint_int." + }, + { + "nebula_name": "EverLtTintInt", + "sql_token": "EVERLTTINTINT", + "meos_call": "ever_lt_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event ever_lt_tint_int." + }, + { + "nebula_name": "EverNeTintInt", + "sql_token": "EVERNETINTINT", + "meos_call": "ever_ne_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event ever_ne_tint_int." + }, + { + "nebula_name": "TemporalNADFloatScalar", + "sql_token": "TEMPORAL_NAD_FLOAT_SCALAR", + "meos_call": "nad_tfloat_float", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "value", + "threshold_call_expr": "threshold", + "comment_one_liner": "Per-event nad_tfloat_float distance." + }, + { + "nebula_name": "TemporalNADIntScalar", + "sql_token": "TEMPORAL_NAD_INT_SCALAR", + "meos_call": "nad_tint_int", + "args": [ + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "threshold", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_point_with_scalar": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(value)", + "threshold_call_expr": "static_cast(threshold)", + "comment_one_liner": "Per-event nad_tint_int distance." + }, + { + "nebula_name": "AlwaysEqFloatTfloat", + "sql_token": "ALWAYSEQFLOATTFLOAT", + "meos_call": "always_eq_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event always_eq_float_tfloat (scalar first)." + }, + { + "nebula_name": "AlwaysGeFloatTfloat", + "sql_token": "ALWAYSGEFLOATTFLOAT", + "meos_call": "always_ge_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event always_ge_float_tfloat (scalar first)." + }, + { + "nebula_name": "AlwaysGtFloatTfloat", + "sql_token": "ALWAYSGTFLOATTFLOAT", + "meos_call": "always_gt_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event always_gt_float_tfloat (scalar first)." + }, + { + "nebula_name": "AlwaysLeFloatTfloat", + "sql_token": "ALWAYSLEFLOATTFLOAT", + "meos_call": "always_le_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event always_le_float_tfloat (scalar first)." + }, + { + "nebula_name": "AlwaysLtFloatTfloat", + "sql_token": "ALWAYSLTFLOATTFLOAT", + "meos_call": "always_lt_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event always_lt_float_tfloat (scalar first)." + }, + { + "nebula_name": "AlwaysNeFloatTfloat", + "sql_token": "ALWAYSNEFLOATTFLOAT", + "meos_call": "always_ne_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event always_ne_float_tfloat (scalar first)." + }, + { + "nebula_name": "EverEqFloatTfloat", + "sql_token": "EVEREQFLOATTFLOAT", + "meos_call": "ever_eq_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event ever_eq_float_tfloat (scalar first)." + }, + { + "nebula_name": "EverGeFloatTfloat", + "sql_token": "EVERGEFLOATTFLOAT", + "meos_call": "ever_ge_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event ever_ge_float_tfloat (scalar first)." + }, + { + "nebula_name": "EverGtFloatTfloat", + "sql_token": "EVERGTFLOATTFLOAT", + "meos_call": "ever_gt_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event ever_gt_float_tfloat (scalar first)." + }, + { + "nebula_name": "EverLeFloatTfloat", + "sql_token": "EVERLEFLOATTFLOAT", + "meos_call": "ever_le_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event ever_le_float_tfloat (scalar first)." + }, + { + "nebula_name": "EverLtFloatTfloat", + "sql_token": "EVERLTFLOATTFLOAT", + "meos_call": "ever_lt_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event ever_lt_float_tfloat (scalar first)." + }, + { + "nebula_name": "EverNeFloatTfloat", + "sql_token": "EVERNEFLOATTFLOAT", + "meos_call": "ever_ne_float_tfloat", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tfloat_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "v", + "scalar_call_expr": "d", + "comment_one_liner": "Per-event ever_ne_float_tfloat (scalar first)." + }, + { + "nebula_name": "AlwaysEqIntTint", + "sql_token": "ALWAYSEQINTTINT", + "meos_call": "always_eq_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event always_eq_int_tint (scalar first)." + }, + { + "nebula_name": "AlwaysGeIntTint", + "sql_token": "ALWAYSGEINTTINT", + "meos_call": "always_ge_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event always_ge_int_tint (scalar first)." + }, + { + "nebula_name": "AlwaysGtIntTint", + "sql_token": "ALWAYSGTINTTINT", + "meos_call": "always_gt_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event always_gt_int_tint (scalar first)." + }, + { + "nebula_name": "AlwaysLeIntTint", + "sql_token": "ALWAYSLEINTTINT", + "meos_call": "always_le_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event always_le_int_tint (scalar first)." + }, + { + "nebula_name": "AlwaysLtIntTint", + "sql_token": "ALWAYSLTINTTINT", + "meos_call": "always_lt_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event always_lt_int_tint (scalar first)." + }, + { + "nebula_name": "AlwaysNeIntTint", + "sql_token": "ALWAYSNEINTTINT", + "meos_call": "always_ne_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event always_ne_int_tint (scalar first)." + }, + { + "nebula_name": "EverEqIntTint", + "sql_token": "EVEREQINTTINT", + "meos_call": "ever_eq_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event ever_eq_int_tint (scalar first)." + }, + { + "nebula_name": "EverGeIntTint", + "sql_token": "EVERGEINTTINT", + "meos_call": "ever_ge_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event ever_ge_int_tint (scalar first)." + }, + { + "nebula_name": "EverGtIntTint", + "sql_token": "EVERGTINTTINT", + "meos_call": "ever_gt_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event ever_gt_int_tint (scalar first)." + }, + { + "nebula_name": "EverLeIntTint", + "sql_token": "EVERLEINTTINT", + "meos_call": "ever_le_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event ever_le_int_tint (scalar first)." + }, + { + "nebula_name": "EverLtIntTint", + "sql_token": "EVERLTINTTINT", + "meos_call": "ever_lt_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event ever_lt_int_tint (scalar first)." + }, + { + "nebula_name": "EverNeIntTint", + "sql_token": "EVERNEINTTINT", + "meos_call": "ever_ne_int_tint", + "args": [ + { + "name": "scalar", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "value", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "ts", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnumber_scalar_first": true, + "tnumber_in_fn": "tint_in", + "tnumber_value_cpp_type": "double", + "tnumber_wkt_format": "{}@{}", + "value_fmt_expr": "static_cast(v)", + "scalar_call_expr": "static_cast(d)", + "comment_one_liner": "Per-event ever_ne_int_tint (scalar first)." + }, + { + "nebula_name": "MultTnumberTnumber", + "sql_token": "MULTTNUMBERTNUMBER", + "meos_call": "mul_tnumber_tnumber", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos.h" + ], + "comment_one_liner": "Per-event mul_tnumber_tnumber over hex-WKB pair." + }, + { + "nebula_name": "TcontainsTgeoTgeo", + "sql_token": "TCONTAINSTGEOTGEO", + "meos_call": "tcontains_tgeo_tgeo", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_geo.h" + ], + "comment_one_liner": "Per-event tcontains_tgeo_tgeo over hex-WKB pair." + }, + { + "nebula_name": "TcoversTgeoTgeo", + "sql_token": "TCOVERSTGEOTGEO", + "meos_call": "tcovers_tgeo_tgeo", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_geo.h" + ], + "comment_one_liner": "Per-event tcovers_tgeo_tgeo over hex-WKB pair." + }, + { + "nebula_name": "TdistanceTgeoTgeo", + "sql_token": "TDISTANCETGEOTGEO", + "meos_call": "tdistance_tgeo_tgeo", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_geo.h" + ], + "comment_one_liner": "Per-event tdistance_tgeo_tgeo over hex-WKB pair." + }, + { + "nebula_name": "TcontainsTcbufferTcbuffer", + "sql_token": "TCONTAINSTCBUFFERTCBUFFER", + "meos_call": "tcontains_tcbuffer_tcbuffer", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_cbuffer.h" + ], + "comment_one_liner": "Per-event tcontains_tcbuffer_tcbuffer over hex-WKB pair." + }, + { + "nebula_name": "TcoversTcbufferTcbuffer", + "sql_token": "TCOVERSTCBUFFERTCBUFFER", + "meos_call": "tcovers_tcbuffer_tcbuffer", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_cbuffer.h" + ], + "comment_one_liner": "Per-event tcovers_tcbuffer_tcbuffer over hex-WKB pair." + }, + { + "nebula_name": "TdistanceTcbufferTcbuffer", + "sql_token": "TDISTANCETCBUFFERTCBUFFER", + "meos_call": "tdistance_tcbuffer_tcbuffer", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_cbuffer.h" + ], + "comment_one_liner": "Per-event tdistance_tcbuffer_tcbuffer over hex-WKB pair." + }, + { + "nebula_name": "TdistanceTnpointTnpoint", + "sql_token": "TDISTANCETNPOINTTNPOINT", + "meos_call": "tdistance_tnpoint_tnpoint", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_npoint.h" + ], + "comment_one_liner": "Per-event tdistance_tnpoint_tnpoint over hex-WKB pair." + }, + { + "nebula_name": "TdistanceTposeTpose", + "sql_token": "TDISTANCETPOSETPOSE", + "meos_call": "tdistance_tpose_tpose", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [ + { + "kind": "wkb_temporal" + } + ], + "return_kind": "wkb", + "extra_headers": [ + "meos_pose.h" + ], + "comment_one_liner": "Per-event tdistance_tpose_tpose over hex-WKB pair." + }, + { + "nebula_name": "TpointLengthWkb", + "sql_token": "TPOINT_LENGTH_WKB", + "meos_call": "tpoint_length", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [], + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "comment_one_liner": "Per-event tpoint_length from a hex-WKB tgeompoint." + }, + { + "nebula_name": "TnpointLength", + "sql_token": "TNPOINT_LENGTH", + "meos_call": "tnpoint_length", + "build_generic": true, + "input_type": "tnpoint", + "extra_args": [], + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "comment_one_liner": "Per-event tnpoint_length." + }, + { + "nebula_name": "TcbufferToTfloat", + "sql_token": "TCBUFFER_TO_TFLOAT", + "meos_call": "tcbuffer_to_tfloat", + "build_generic": true, + "input_type": "tcbuffer", + "extra_args": [], + "return_kind": "extract_double", + "extra_headers": [ + "meos_cbuffer.h" + ], + "comment_one_liner": "Per-event tcbuffer_to_tfloat radius extraction." + }, + { + "nebula_name": "NadTcbufferStbox", + "sql_token": "NAD_TCBUFFER_STBOX", + "meos_call": "nad_tcbuffer_stbox", + "build_generic": true, + "input_type": "tcbuffer", + "extra_args": [ + { + "kind": "box", + "box_type": "STBox", + "parser": "stbox_in", + "header": "meos_geo.h" + } + ], + "return_kind": "double", + "extra_headers": [ + "meos_cbuffer.h", + "meos_geo.h" + ], + "comment_one_liner": "Per-event nad_tcbuffer_stbox distance." + }, + { + "nebula_name": "NadTnpointStbox", + "sql_token": "NAD_TNPOINT_STBOX", + "meos_call": "nad_tnpoint_stbox", + "build_generic": true, + "input_type": "tnpoint", + "extra_args": [ + { + "kind": "box", + "box_type": "STBox", + "parser": "stbox_in", + "header": "meos_geo.h" + } + ], + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h", + "meos_geo.h" + ], + "comment_one_liner": "Per-event nad_tnpoint_stbox distance." + }, + { + "nebula_name": "NadTposeStbox", + "sql_token": "NAD_TPOSE_STBOX", + "meos_call": "nad_tpose_stbox", + "build_generic": true, + "input_type": "tpose", + "extra_args": [ + { + "kind": "box", + "box_type": "STBox", + "parser": "stbox_in", + "header": "meos_geo.h" + } + ], + "return_kind": "double", + "extra_headers": [ + "meos_pose.h", + "meos_geo.h" + ], + "comment_one_liner": "Per-event nad_tpose_stbox distance." + }, + { + "nebula_name": "AtouchesTpointGeo", + "sql_token": "ATOUCHESTPOINTGEO", + "meos_call": "atouches_tpoint_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event atouches_tpoint_geo spatial predicate." + }, + { + "nebula_name": "EtouchesTpointGeo", + "sql_token": "ETOUCHESTPOINTGEO", + "meos_call": "etouches_tpoint_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event etouches_tpoint_geo spatial predicate." + }, + { + "nebula_name": "TemporalAContainsGeometry", + "sql_token": "TEMPORALACONTAINSGEOMETRY", + "meos_call": "acontains_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event acontains_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalADisjointGeometry", + "sql_token": "TEMPORALADISJOINTGEOMETRY", + "meos_call": "adisjoint_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event adisjoint_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalAIntersectsGeometry", + "sql_token": "TEMPORALAINTERSECTSGEOMETRY", + "meos_call": "aintersects_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event aintersects_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalATouchesGeometry", + "sql_token": "TEMPORALATOUCHESGEOMETRY", + "meos_call": "atouches_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event atouches_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalEContainsGeometry", + "sql_token": "TEMPORALECONTAINSGEOMETRY", + "meos_call": "econtains_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event econtains_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalECoversGeometry", + "sql_token": "TEMPORALECOVERSGEOMETRY", + "meos_call": "ecovers_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event ecovers_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalEDisjointGeometry", + "sql_token": "TEMPORALEDISJOINTGEOMETRY", + "meos_call": "edisjoint_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event edisjoint_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalEIntersectsGeometry", + "sql_token": "TEMPORALEINTERSECTSGEOMETRY", + "meos_call": "eintersects_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event eintersects_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalETouchesGeometry", + "sql_token": "TEMPORALETOUCHESGEOMETRY", + "meos_call": "etouches_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event etouches_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalIntersectsGeometry", + "sql_token": "TEMPORALINTERSECTSGEOMETRY", + "meos_call": "intersects_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event intersects_tgeo_geo spatial predicate." + }, + { + "nebula_name": "TemporalAtGeometry", + "sql_token": "TEMPORALATGEOMETRY", + "meos_call": "tgeo_at_geom", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_restriction": true, + "comment_one_liner": "Per-event tgeo_at_geom restriction predicate." + }, + { + "nebula_name": "TemporalMinusGeometry", + "sql_token": "TEMPORALMINUSGEOMETRY", + "meos_call": "tgeo_minus_geom", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_restriction": true, + "comment_one_liner": "Per-event tgeo_minus_geom restriction predicate." + }, + { + "nebula_name": "TemporalADWithinGeometry", + "sql_token": "TEMPORALADWITHINGEOMETRY", + "meos_call": "adwithin_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_with_dist": true, + "comment_one_liner": "Per-event adwithin_tgeo_geo dwithin predicate." + }, + { + "nebula_name": "TemporalEDWithinGeometry", + "sql_token": "TEMPORALEDWITHINGEOMETRY", + "meos_call": "edwithin_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_with_dist": true, + "comment_one_liner": "Per-event edwithin_tgeo_geo dwithin predicate." + }, + { + "nebula_name": "TemporalADWithinTGeometry", + "sql_token": "TEMPORALADWITHINTGEOMETRY", + "meos_call": "adwithin_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points_with_dist": true, + "comment_one_liner": "Per-event adwithin_tgeo_tgeo dwithin predicate." + }, + { + "nebula_name": "TemporalEDWithinTGeometry", + "sql_token": "TEMPORALEDWITHINTGEOMETRY", + "meos_call": "edwithin_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points_with_dist": true, + "comment_one_liner": "Per-event edwithin_tgeo_tgeo dwithin predicate." + }, + { + "nebula_name": "TemporalAContainsTGeometry", + "sql_token": "TEMPORALACONTAINSTGEOMETRY", + "meos_call": "acontains_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event acontains_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalADisjointTGeometry", + "sql_token": "TEMPORALADISJOINTTGEOMETRY", + "meos_call": "adisjoint_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event adisjoint_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalAIntersectsTGeometry", + "sql_token": "TEMPORALAINTERSECTSTGEOMETRY", + "meos_call": "aintersects_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event aintersects_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalATouchesTGeometry", + "sql_token": "TEMPORALATOUCHESTGEOMETRY", + "meos_call": "atouches_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event atouches_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalEContainsTGeometry", + "sql_token": "TEMPORALECONTAINSTGEOMETRY", + "meos_call": "econtains_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event econtains_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalECoversTGeometry", + "sql_token": "TEMPORALECOVERSTGEOMETRY", + "meos_call": "ecovers_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ecovers_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalEDisjointTGeometry", + "sql_token": "TEMPORALEDISJOINTTGEOMETRY", + "meos_call": "edisjoint_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event edisjoint_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalEIntersectsTGeometry", + "sql_token": "TEMPORALEINTERSECTSTGEOMETRY", + "meos_call": "eintersects_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event eintersects_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalETouchesTGeometry", + "sql_token": "TEMPORALETOUCHESTGEOMETRY", + "meos_call": "etouches_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event etouches_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "TemporalNADGeometry", + "sql_token": "TEMPORAL_NAD_GEOMETRY", + "meos_call": "nad_tgeo_geo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event nad_tgeo_geo nearest-approach distance." + }, + { + "nebula_name": "TemporalAContainsTCbuffer", + "sql_token": "TEMPORALACONTAINSTCBUFFER", + "meos_call": "acontains_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event acontains_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalACoversTCbuffer", + "sql_token": "TEMPORALACOVERSTCBUFFER", + "meos_call": "acovers_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event acovers_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalADisjointTCbuffer", + "sql_token": "TEMPORALADISJOINTTCBUFFER", + "meos_call": "adisjoint_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event adisjoint_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalAIntersectsTCbuffer", + "sql_token": "TEMPORALAINTERSECTSTCBUFFER", + "meos_call": "aintersects_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event aintersects_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalATouchesTCbuffer", + "sql_token": "TEMPORALATOUCHESTCBUFFER", + "meos_call": "atouches_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event atouches_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalEContainsTCbuffer", + "sql_token": "TEMPORALECONTAINSTCBUFFER", + "meos_call": "econtains_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event econtains_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalECoversTCbuffer", + "sql_token": "TEMPORALECOVERSTCBUFFER", + "meos_call": "ecovers_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event ecovers_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalEDisjointTCbuffer", + "sql_token": "TEMPORALEDISJOINTTCBUFFER", + "meos_call": "edisjoint_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event edisjoint_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalEIntersectsTCbuffer", + "sql_token": "TEMPORALEINTERSECTSTCBUFFER", + "meos_call": "eintersects_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event eintersects_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalETouchesTCbuffer", + "sql_token": "TEMPORALETOUCHESTCBUFFER", + "meos_call": "etouches_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event etouches_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "TemporalNADTCbuffer", + "sql_token": "TEMPORAL_NAD_TCBUFFER", + "meos_call": "nad_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event nad_tcbuffer_geo distance." + }, + { + "nebula_name": "TemporalADWithinTCbufferGeometry", + "sql_token": "TEMPORALADWITHINTCBUFFERGEOMETRY", + "meos_call": "adwithin_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_with_dist": true, + "comment_one_liner": "Per-event adwithin_tcbuffer_geo dwithin predicate." + }, + { + "nebula_name": "TemporalEDWithinTCbufferGeometry", + "sql_token": "TEMPORALEDWITHINTCBUFFERGEOMETRY", + "meos_call": "edwithin_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_with_dist": true, + "comment_one_liner": "Per-event edwithin_tcbuffer_geo dwithin predicate." + }, + { + "nebula_name": "AlwaysEqTcbufferCbuffer", + "sql_token": "ALWAYSEQTCBUFFERCBUFFER", + "meos_call": "always_eq_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event always_eq_tcbuffer_cbuffer." + }, + { + "nebula_name": "AlwaysNeTcbufferCbuffer", + "sql_token": "ALWAYSNETCBUFFERCBUFFER", + "meos_call": "always_ne_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event always_ne_tcbuffer_cbuffer." + }, + { + "nebula_name": "EverEqTcbufferCbuffer", + "sql_token": "EVEREQTCBUFFERCBUFFER", + "meos_call": "ever_eq_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event ever_eq_tcbuffer_cbuffer." + }, + { + "nebula_name": "EverNeTcbufferCbuffer", + "sql_token": "EVERNETCBUFFERCBUFFER", + "meos_call": "ever_ne_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event ever_ne_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalAContainsTCbufferCbuffer", + "sql_token": "TEMPORALACONTAINSTCBUFFERCBUFFER", + "meos_call": "acontains_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event acontains_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalACoversTCbufferCbuffer", + "sql_token": "TEMPORALACOVERSTCBUFFERCBUFFER", + "meos_call": "acovers_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event acovers_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalADisjointTCbufferCbuffer", + "sql_token": "TEMPORALADISJOINTTCBUFFERCBUFFER", + "meos_call": "adisjoint_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event adisjoint_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalAIntersectsTCbufferCbuffer", + "sql_token": "TEMPORALAINTERSECTSTCBUFFERCBUFFER", + "meos_call": "aintersects_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event aintersects_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalATouchesTCbufferCbuffer", + "sql_token": "TEMPORALATOUCHESTCBUFFERCBUFFER", + "meos_call": "atouches_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event atouches_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalEContainsTCbufferCbuffer", + "sql_token": "TEMPORALECONTAINSTCBUFFERCBUFFER", + "meos_call": "econtains_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event econtains_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalECoversTCbufferCbuffer", + "sql_token": "TEMPORALECOVERSTCBUFFERCBUFFER", + "meos_call": "ecovers_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event ecovers_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalEDisjointTCbufferCbuffer", + "sql_token": "TEMPORALEDISJOINTTCBUFFERCBUFFER", + "meos_call": "edisjoint_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event edisjoint_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalEIntersectsTCbufferCbuffer", + "sql_token": "TEMPORALEINTERSECTSTCBUFFERCBUFFER", + "meos_call": "eintersects_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event eintersects_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalETouchesTCbufferCbuffer", + "sql_token": "TEMPORALETOUCHESTCBUFFERCBUFFER", + "meos_call": "etouches_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event etouches_tcbuffer_cbuffer." + }, + { + "nebula_name": "TemporalNADTCbufferCbuffer", + "sql_token": "TEMPORAL_NAD_TCBUFFER_CBUFFER", + "meos_call": "nad_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tcbuffer_point_cbuffer": true, + "comment_one_liner": "Per-event nad_tcbuffer_cbuffer distance." + }, + { + "nebula_name": "TemporalADWithinTCbufferCbuffer", + "sql_token": "TEMPORALADWITHINTCBUFFERCBUFFER", + "meos_call": "adwithin_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer_with_dist": true, + "comment_one_liner": "Per-event adwithin_tcbuffer_cbuffer dwithin predicate." + }, + { + "nebula_name": "TemporalEDWithinTCbufferCbuffer", + "sql_token": "TEMPORALEDWITHINTCBUFFERCBUFFER", + "meos_call": "edwithin_tcbuffer_cbuffer", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "cbufLit", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer_with_dist": true, + "comment_one_liner": "Per-event edwithin_tcbuffer_cbuffer dwithin predicate." + }, + { + "nebula_name": "TemporalADisjointTCbufferTCbuffer", + "sql_token": "TEMPORALADISJOINTTCBUFFERTCBUFFER", + "meos_call": "adisjoint_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event adisjoint_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "TemporalAIntersectsTCbufferTCbuffer", + "sql_token": "TEMPORALAINTERSECTSTCBUFFERTCBUFFER", + "meos_call": "aintersects_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event aintersects_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "TemporalATouchesTCbufferTCbuffer", + "sql_token": "TEMPORALATOUCHESTCBUFFERTCBUFFER", + "meos_call": "atouches_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event atouches_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "TemporalECoversTCbufferTCbuffer", + "sql_token": "TEMPORALECOVERSTCBUFFERTCBUFFER", + "meos_call": "ecovers_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event ecovers_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "TemporalNADTCbufferTCbuffer", + "sql_token": "TEMPORAL_NAD_TCBUFFER_TCBUFFER", + "meos_call": "nad_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event nad_tcbuffer_tcbuffer distance." + }, + { + "nebula_name": "TemporalADWithinTCbufferTCbuffer", + "sql_token": "TEMPORALADWITHINTCBUFFERTCBUFFER", + "meos_call": "adwithin_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points_with_dist": true, + "comment_one_liner": "Per-event adwithin_tcbuffer_tcbuffer dwithin predicate." + }, + { + "nebula_name": "TemporalEDWithinTCbufferTCbuffer", + "sql_token": "TEMPORALEDWITHINTCBUFFERTCBUFFER", + "meos_call": "edwithin_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points_with_dist": true, + "comment_one_liner": "Per-event edwithin_tcbuffer_tcbuffer dwithin predicate." + }, + { + "nebula_name": "TemporalAtStBox", + "sql_token": "TEMPORAL_AT_STBOX", + "meos_call": "tgeo_at_stbox", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_restriction": true, + "comment_one_liner": "Per-event tgeo_at_stbox restriction predicate." + }, + { + "nebula_name": "TemporalEIntersectsTCbufferTCbuffer", + "sql_token": "TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER", + "meos_call": "eintersects_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event eintersects_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "TemporalETouchesTCbufferTCbuffer", + "sql_token": "TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER", + "meos_call": "etouches_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event etouches_tcbuffer_tcbuffer spatial predicate." + } + ] +} diff --git a/tools/codegen/numeric-descriptor.json b/tools/codegen/numeric-descriptor.json new file mode 100644 index 0000000000..737c37fc13 --- /dev/null +++ b/tools/codegen/numeric-descriptor.json @@ -0,0 +1,927 @@ +{ + "_comment": "Numeric + tbool families descriptor; input ac7e7d1469", + "operators": [ + { + "nebula_name": "AddTfloatFloat", + "sql_token": "ADD_TFLOAT_FLOAT", + "meos_call": "add_tfloat_float", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event add_tfloat_float: single-instant tfloat plus scalar float." + }, + { + "nebula_name": "SubTfloatFloat", + "sql_token": "SUB_TFLOAT_FLOAT", + "meos_call": "sub_tfloat_float", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event sub_tfloat_float: single-instant tfloat minus scalar float." + }, + { + "nebula_name": "MulTfloatFloat", + "sql_token": "MUL_TFLOAT_FLOAT", + "meos_call": "mul_tfloat_float", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event mul_tfloat_float: single-instant tfloat times scalar float." + }, + { + "nebula_name": "DivTfloatFloat", + "sql_token": "DIV_TFLOAT_FLOAT", + "meos_call": "div_tfloat_float", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event div_tfloat_float: single-instant tfloat divided by scalar float." + }, + { + "nebula_name": "AddTintInt", + "sql_token": "ADD_TINT_INT", + "meos_call": "add_tint_int", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event add_tint_int: single-instant tint plus scalar int." + }, + { + "nebula_name": "SubTintInt", + "sql_token": "SUB_TINT_INT", + "meos_call": "sub_tint_int", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event sub_tint_int: single-instant tint minus scalar int." + }, + { + "nebula_name": "MulTintInt", + "sql_token": "MUL_TINT_INT", + "meos_call": "mul_tint_int", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event mul_tint_int: single-instant tint times scalar int." + }, + { + "nebula_name": "DivTintInt", + "sql_token": "DIV_TINT_INT", + "meos_call": "div_tint_int", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event div_tint_int: single-instant tint divided by scalar int." + }, + { + "nebula_name": "AddFloatTfloat", + "sql_token": "ADD_FLOAT_TFLOAT", + "meos_call": "add_float_tfloat", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "scalar_first": true, + "comment_one_liner": "Per-event add_float_tfloat: scalar float plus single-instant tfloat." + }, + { + "nebula_name": "SubFloatTfloat", + "sql_token": "SUB_FLOAT_TFLOAT", + "meos_call": "sub_float_tfloat", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "scalar_first": true, + "comment_one_liner": "Per-event sub_float_tfloat: scalar float minus single-instant tfloat." + }, + { + "nebula_name": "MulFloatTfloat", + "sql_token": "MUL_FLOAT_TFLOAT", + "meos_call": "mul_float_tfloat", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "scalar_first": true, + "comment_one_liner": "Per-event mul_float_tfloat: scalar float times single-instant tfloat." + }, + { + "nebula_name": "DivFloatTfloat", + "sql_token": "DIV_FLOAT_TFLOAT", + "meos_call": "div_float_tfloat", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "scalar_first": true, + "comment_one_liner": "Per-event div_float_tfloat: scalar float divided by single-instant tfloat." + }, + { + "nebula_name": "AddIntTint", + "sql_token": "ADD_INT_TINT", + "meos_call": "add_int_tint", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "scalar_first": true, + "comment_one_liner": "Per-event add_int_tint: scalar int plus single-instant tint." + }, + { + "nebula_name": "SubIntTint", + "sql_token": "SUB_INT_TINT", + "meos_call": "sub_int_tint", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "scalar_first": true, + "comment_one_liner": "Per-event sub_int_tint: scalar int minus single-instant tint." + }, + { + "nebula_name": "MulIntTint", + "sql_token": "MUL_INT_TINT", + "meos_call": "mul_int_tint", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "scalar_first": true, + "comment_one_liner": "Per-event mul_int_tint: scalar int times single-instant tint." + }, + { + "nebula_name": "DivIntTint", + "sql_token": "DIV_INT_TINT", + "meos_call": "div_int_tint", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "scalar_first": true, + "comment_one_liner": "Per-event div_int_tint: scalar int divided by single-instant tint." + }, + { + "nebula_name": "AddTbigintBigint", + "sql_token": "ADD_TBIGINT_BIGINT", + "meos_call": "add_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event add_tbigint_bigint: single-instant tbigint plus scalar bigint." + }, + { + "nebula_name": "SubTbigintBigint", + "sql_token": "SUB_TBIGINT_BIGINT", + "meos_call": "sub_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event sub_tbigint_bigint: single-instant tbigint minus scalar bigint." + }, + { + "nebula_name": "MulTbigintBigint", + "sql_token": "MUL_TBIGINT_BIGINT", + "meos_call": "mul_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event mul_tbigint_bigint: single-instant tbigint times scalar bigint." + }, + { + "nebula_name": "DivTbigintBigint", + "sql_token": "DIV_TBIGINT_BIGINT", + "meos_call": "div_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event div_tbigint_bigint: single-instant tbigint divided by scalar bigint." + }, + { + "nebula_name": "AddBigintTbigint", + "sql_token": "ADD_BIGINT_TBIGINT", + "meos_call": "add_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "scalar_first": true, + "comment_one_liner": "Per-event add_bigint_tbigint: scalar bigint plus single-instant tbigint." + }, + { + "nebula_name": "SubBigintTbigint", + "sql_token": "SUB_BIGINT_TBIGINT", + "meos_call": "sub_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "scalar_first": true, + "comment_one_liner": "Per-event sub_bigint_tbigint: scalar bigint minus single-instant tbigint." + }, + { + "nebula_name": "MulBigintTbigint", + "sql_token": "MUL_BIGINT_TBIGINT", + "meos_call": "mul_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "scalar_first": true, + "comment_one_liner": "Per-event mul_bigint_tbigint: scalar bigint times single-instant tbigint." + }, + { + "nebula_name": "DivBigintTbigint", + "sql_token": "DIV_BIGINT_TBIGINT", + "meos_call": "div_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "scalar_first": true, + "comment_one_liner": "Per-event div_bigint_tbigint: scalar bigint divided by single-instant tbigint." + }, + { + "nebula_name": "AddTnumberTnumber", + "sql_token": "ADD_TNUMBER_TNUMBER", + "meos_call": "add_tnumber_tnumber", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event add_tnumber_tnumber: two temporal numbers added (WKB result)." + }, + { + "nebula_name": "SubTnumberTnumber", + "sql_token": "SUB_TNUMBER_TNUMBER", + "meos_call": "sub_tnumber_tnumber", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event sub_tnumber_tnumber: two temporal numbers subtracted (WKB result)." + }, + { + "nebula_name": "MulTnumberTnumber", + "sql_token": "MUL_TNUMBER_TNUMBER", + "meos_call": "mul_tnumber_tnumber", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event mul_tnumber_tnumber: two temporal numbers multiplied (WKB result)." + }, + { + "nebula_name": "DivTnumberTnumber", + "sql_token": "DIV_TNUMBER_TNUMBER", + "meos_call": "div_tnumber_tnumber", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event div_tnumber_tnumber: two temporal numbers divided (WKB result)." + }, + { + "nebula_name": "TfloatShiftValue", + "sql_token": "TFLOAT_SHIFT_VALUE", + "meos_call": "tfloat_shift_value", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_shift_value: shift single-instant tfloat value by scalar." + }, + { + "nebula_name": "TfloatScaleValue", + "sql_token": "TFLOAT_SCALE_VALUE", + "meos_call": "tfloat_scale_value", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_scale_value: scale single-instant tfloat value by scalar." + }, + { + "nebula_name": "TfloatShiftScaleValue", + "sql_token": "TFLOAT_SHIFT_SCALE_VALUE", + "meos_call": "tfloat_shift_scale_value", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}, {"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_shift_scale_value: shift then scale single-instant tfloat value." + }, + { + "nebula_name": "TintShiftValue", + "sql_token": "TINT_SHIFT_VALUE", + "meos_call": "tint_shift_value", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tint_shift_value: shift single-instant tint value by scalar." + }, + { + "nebula_name": "TintScaleValue", + "sql_token": "TINT_SCALE_VALUE", + "meos_call": "tint_scale_value", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tint_scale_value: scale single-instant tint value by scalar." + }, + { + "nebula_name": "TintShiftScaleValue", + "sql_token": "TINT_SHIFT_SCALE_VALUE", + "meos_call": "tint_shift_scale_value", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}, {"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tint_shift_scale_value: shift then scale single-instant tint value." + }, + { + "nebula_name": "TbigintShiftValue", + "sql_token": "TBIGINT_SHIFT_VALUE", + "meos_call": "tbigint_shift_value", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event tbigint_shift_value: shift single-instant tbigint value by scalar." + }, + { + "nebula_name": "TbigintScaleValue", + "sql_token": "TBIGINT_SCALE_VALUE", + "meos_call": "tbigint_scale_value", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event tbigint_scale_value: scale single-instant tbigint value by scalar." + }, + { + "nebula_name": "TbigintShiftScaleValue", + "sql_token": "TBIGINT_SHIFT_SCALE_VALUE", + "meos_call": "tbigint_shift_scale_value", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}, {"kind": "bigint_scalar"}], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event tbigint_shift_scale_value: shift then scale single-instant tbigint value." + }, + { + "nebula_name": "TdistanceTfloatFloat", + "sql_token": "TDISTANCE_TFLOAT_FLOAT", + "meos_call": "tdistance_tfloat_float", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "scalar", "cpp": "double"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tdistance_tfloat_float: temporal distance between tfloat and scalar float." + }, + { + "nebula_name": "TdistanceTintInt", + "sql_token": "TDISTANCE_TINT_INT", + "meos_call": "tdistance_tint_int", + "build_generic": true, + "input_type": "tint", + "extra_args": [{"kind": "scalar", "cpp": "int32_t"}], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tdistance_tint_int: temporal distance between tint and scalar int." + }, + { + "nebula_name": "TdistanceTnumberTnumber", + "sql_token": "TDISTANCE_TNUMBER_TNUMBER", + "meos_call": "tdistance_tnumber_tnumber", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event tdistance_tnumber_tnumber: temporal distance between two tnumbers (WKB result)." + }, + { + "nebula_name": "TemporalRound", + "sql_token": "TEMPORAL_ROUND", + "meos_call": "temporal_round", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [{"kind": "int_scalar"}], + "return_kind": "extract_double", + "comment_one_liner": "Per-event temporal_round: round single-instant tfloat to given decimal places." + }, + { + "nebula_name": "EverEqTbigintBigint", + "sql_token": "EVER_EQ_TBIGINT_BIGINT", + "meos_call": "ever_eq_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_eq_tbigint_bigint: ever-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "EverNeTbigintBigint", + "sql_token": "EVER_NE_TBIGINT_BIGINT", + "meos_call": "ever_ne_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_ne_tbigint_bigint: ever-not-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "EverLtTbigintBigint", + "sql_token": "EVER_LT_TBIGINT_BIGINT", + "meos_call": "ever_lt_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_lt_tbigint_bigint: ever-less-than tbigint vs scalar bigint." + }, + { + "nebula_name": "EverLeTbigintBigint", + "sql_token": "EVER_LE_TBIGINT_BIGINT", + "meos_call": "ever_le_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_le_tbigint_bigint: ever-less-or-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "EverGtTbigintBigint", + "sql_token": "EVER_GT_TBIGINT_BIGINT", + "meos_call": "ever_gt_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_gt_tbigint_bigint: ever-greater-than tbigint vs scalar bigint." + }, + { + "nebula_name": "EverGeTbigintBigint", + "sql_token": "EVER_GE_TBIGINT_BIGINT", + "meos_call": "ever_ge_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_ge_tbigint_bigint: ever-greater-or-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "AlwaysEqTbigintBigint", + "sql_token": "ALWAYS_EQ_TBIGINT_BIGINT", + "meos_call": "always_eq_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_eq_tbigint_bigint: always-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "AlwaysNeTbigintBigint", + "sql_token": "ALWAYS_NE_TBIGINT_BIGINT", + "meos_call": "always_ne_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_ne_tbigint_bigint: always-not-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "AlwaysLtTbigintBigint", + "sql_token": "ALWAYS_LT_TBIGINT_BIGINT", + "meos_call": "always_lt_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_lt_tbigint_bigint: always-less-than tbigint vs scalar bigint." + }, + { + "nebula_name": "AlwaysLeTbigintBigint", + "sql_token": "ALWAYS_LE_TBIGINT_BIGINT", + "meos_call": "always_le_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_le_tbigint_bigint: always-less-or-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "AlwaysGtTbigintBigint", + "sql_token": "ALWAYS_GT_TBIGINT_BIGINT", + "meos_call": "always_gt_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_gt_tbigint_bigint: always-greater-than tbigint vs scalar bigint." + }, + { + "nebula_name": "AlwaysGeTbigintBigint", + "sql_token": "ALWAYS_GE_TBIGINT_BIGINT", + "meos_call": "always_ge_tbigint_bigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_ge_tbigint_bigint: always-greater-or-equal tbigint vs scalar bigint." + }, + { + "nebula_name": "EverEqBigintTbigint", + "sql_token": "EVER_EQ_BIGINT_TBIGINT", + "meos_call": "ever_eq_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_eq_bigint_tbigint: ever-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "EverNeBigintTbigint", + "sql_token": "EVER_NE_BIGINT_TBIGINT", + "meos_call": "ever_ne_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_ne_bigint_tbigint: ever-not-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "EverLtBigintTbigint", + "sql_token": "EVER_LT_BIGINT_TBIGINT", + "meos_call": "ever_lt_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_lt_bigint_tbigint: ever-less-than scalar bigint vs tbigint." + }, + { + "nebula_name": "EverLeBigintTbigint", + "sql_token": "EVER_LE_BIGINT_TBIGINT", + "meos_call": "ever_le_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_le_bigint_tbigint: ever-less-or-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "EverGtBigintTbigint", + "sql_token": "EVER_GT_BIGINT_TBIGINT", + "meos_call": "ever_gt_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_gt_bigint_tbigint: ever-greater-than scalar bigint vs tbigint." + }, + { + "nebula_name": "EverGeBigintTbigint", + "sql_token": "EVER_GE_BIGINT_TBIGINT", + "meos_call": "ever_ge_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_ge_bigint_tbigint: ever-greater-or-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "AlwaysEqBigintTbigint", + "sql_token": "ALWAYS_EQ_BIGINT_TBIGINT", + "meos_call": "always_eq_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_eq_bigint_tbigint: always-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "AlwaysNeBigintTbigint", + "sql_token": "ALWAYS_NE_BIGINT_TBIGINT", + "meos_call": "always_ne_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_ne_bigint_tbigint: always-not-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "AlwaysLtBigintTbigint", + "sql_token": "ALWAYS_LT_BIGINT_TBIGINT", + "meos_call": "always_lt_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_lt_bigint_tbigint: always-less-than scalar bigint vs tbigint." + }, + { + "nebula_name": "AlwaysLeBigintTbigint", + "sql_token": "ALWAYS_LE_BIGINT_TBIGINT", + "meos_call": "always_le_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_le_bigint_tbigint: always-less-or-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "AlwaysGtBigintTbigint", + "sql_token": "ALWAYS_GT_BIGINT_TBIGINT", + "meos_call": "always_gt_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_gt_bigint_tbigint: always-greater-than scalar bigint vs tbigint." + }, + { + "nebula_name": "AlwaysGeBigintTbigint", + "sql_token": "ALWAYS_GE_BIGINT_TBIGINT", + "meos_call": "always_ge_bigint_tbigint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [{"kind": "bigint_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_ge_bigint_tbigint: always-greater-or-equal scalar bigint vs tbigint." + }, + { + "nebula_name": "EverEqTboolBool", + "sql_token": "EVER_EQ_TBOOL_BOOL", + "meos_call": "ever_eq_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_eq_tbool_bool: ever-equal tbool vs scalar bool." + }, + { + "nebula_name": "EverNeTboolBool", + "sql_token": "EVER_NE_TBOOL_BOOL", + "meos_call": "ever_ne_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event ever_ne_tbool_bool: ever-not-equal tbool vs scalar bool." + }, + { + "nebula_name": "AlwaysEqTboolBool", + "sql_token": "ALWAYS_EQ_TBOOL_BOOL", + "meos_call": "always_eq_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_eq_tbool_bool: always-equal tbool vs scalar bool." + }, + { + "nebula_name": "AlwaysNeTboolBool", + "sql_token": "ALWAYS_NE_TBOOL_BOOL", + "meos_call": "always_ne_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "comment_one_liner": "Per-event always_ne_tbool_bool: always-not-equal tbool vs scalar bool." + }, + { + "nebula_name": "EverEqBoolTbool", + "sql_token": "EVER_EQ_BOOL_TBOOL", + "meos_call": "ever_eq_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_eq_bool_tbool: ever-equal scalar bool vs tbool." + }, + { + "nebula_name": "EverNeBoolTbool", + "sql_token": "EVER_NE_BOOL_TBOOL", + "meos_call": "ever_ne_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event ever_ne_bool_tbool: ever-not-equal scalar bool vs tbool." + }, + { + "nebula_name": "AlwaysEqBoolTbool", + "sql_token": "ALWAYS_EQ_BOOL_TBOOL", + "meos_call": "always_eq_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_eq_bool_tbool: always-equal scalar bool vs tbool." + }, + { + "nebula_name": "AlwaysNeBoolTbool", + "sql_token": "ALWAYS_NE_BOOL_TBOOL", + "meos_call": "always_ne_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "int", + "scalar_first": true, + "comment_one_liner": "Per-event always_ne_bool_tbool: always-not-equal scalar bool vs tbool." + }, + { + "nebula_name": "TbigintToTint", + "sql_token": "TBIGINT_TO_TINT", + "meos_call": "tbigint_to_tint", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tbigint_to_tint: convert single-instant tbigint to tint." + }, + { + "nebula_name": "TbigintToTfloat", + "sql_token": "TBIGINT_TO_TFLOAT", + "meos_call": "tbigint_to_tfloat", + "build_generic": true, + "input_type": "tbigint", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tbigint_to_tfloat: convert single-instant tbigint to tfloat." + }, + { + "nebula_name": "TintToTbigint", + "sql_token": "TINT_TO_TBIGINT", + "meos_call": "tint_to_tbigint", + "build_generic": true, + "input_type": "tint", + "extra_args": [], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event tint_to_tbigint: convert single-instant tint to tbigint." + }, + { + "nebula_name": "TfloatToTbigint", + "sql_token": "TFLOAT_TO_TBIGINT", + "meos_call": "tfloat_to_tbigint", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_bigint", + "comment_one_liner": "Per-event tfloat_to_tbigint: convert single-instant tfloat to tbigint." + }, + { + "nebula_name": "TboolToTint", + "sql_token": "TBOOL_TO_TINT", + "meos_call": "tbool_to_tint", + "build_generic": true, + "input_type": "tbool", + "extra_args": [], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tbool_to_tint: convert single-instant tbool to tint." + }, + { + "nebula_name": "TnotTbool", + "sql_token": "TNOT_TBOOL", + "meos_call": "tnot_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [], + "return_kind": "extract_bool", + "comment_one_liner": "Per-event tnot_tbool: logical NOT of single-instant tbool." + }, + { + "nebula_name": "TandTboolBool", + "sql_token": "TAND_TBOOL_BOOL", + "meos_call": "tand_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "comment_one_liner": "Per-event tand_tbool_bool: temporal AND of tbool and scalar bool." + }, + { + "nebula_name": "TorTboolBool", + "sql_token": "TOR_TBOOL_BOOL", + "meos_call": "tor_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "comment_one_liner": "Per-event tor_tbool_bool: temporal OR of tbool and scalar bool." + }, + { + "nebula_name": "TeqTboolBool", + "sql_token": "TEQ_TBOOL_BOOL", + "meos_call": "teq_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "comment_one_liner": "Per-event teq_tbool_bool: temporal equality of tbool and scalar bool." + }, + { + "nebula_name": "TneTboolBool", + "sql_token": "TNE_TBOOL_BOOL", + "meos_call": "tne_tbool_bool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "comment_one_liner": "Per-event tne_tbool_bool: temporal inequality of tbool and scalar bool." + }, + { + "nebula_name": "TandBoolTbool", + "sql_token": "TAND_BOOL_TBOOL", + "meos_call": "tand_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "scalar_first": true, + "comment_one_liner": "Per-event tand_bool_tbool: temporal AND of scalar bool and tbool." + }, + { + "nebula_name": "TorBoolTbool", + "sql_token": "TOR_BOOL_TBOOL", + "meos_call": "tor_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "scalar_first": true, + "comment_one_liner": "Per-event tor_bool_tbool: temporal OR of scalar bool and tbool." + }, + { + "nebula_name": "TeqBoolTbool", + "sql_token": "TEQ_BOOL_TBOOL", + "meos_call": "teq_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "scalar_first": true, + "comment_one_liner": "Per-event teq_bool_tbool: temporal equality of scalar bool and tbool." + }, + { + "nebula_name": "TneBoolTbool", + "sql_token": "TNE_BOOL_TBOOL", + "meos_call": "tne_bool_tbool", + "build_generic": true, + "input_type": "tbool", + "extra_args": [{"kind": "bool_scalar"}], + "return_kind": "extract_bool", + "scalar_first": true, + "comment_one_liner": "Per-event tne_bool_tbool: temporal inequality of scalar bool and tbool." + }, + { + "nebula_name": "TandTboolTbool", + "sql_token": "TAND_TBOOL_TBOOL", + "meos_call": "tand_tbool_tbool", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event tand_tbool_tbool: temporal AND of two tbool values (WKB result)." + }, + { + "nebula_name": "TorTboolTbool", + "sql_token": "TOR_TBOOL_TBOOL", + "meos_call": "tor_tbool_tbool", + "build_generic": true, + "input_type": "wkb_temporal", + "extra_args": [{"kind": "wkb_temporal"}], + "return_kind": "wkb", + "comment_one_liner": "Per-event tor_tbool_tbool: temporal OR of two tbool values (WKB result)." + } + ] +} diff --git a/tools/codegen/phasec-composed-descriptor.json b/tools/codegen/phasec-composed-descriptor.json new file mode 100644 index 0000000000..ec689a452c --- /dev/null +++ b/tools/codegen/phasec-composed-descriptor.json @@ -0,0 +1,1953 @@ +{ + "_comment": "Phase C composed spatial predicates: tpose/tnpoint composed via tpose_to_tpoint / tnpoint_to_tgeompoint then tgeo predicate. 48 ops: 12 tpose_geo + 12 tpose_tpose + 12 tnpoint_geo + 12 tnpoint_tnpoint (10 int-returning predicates + 2 dwithin per category). Plus 4 NAD (double-returning) ops.", + "operators": [ + { + "nebula_name": "TemporalEIntersectsTPoseGeometry", + "sql_token": "TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY", + "meos_call": "eintersects_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event eintersects_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAIntersectsTPoseGeometry", + "sql_token": "TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY", + "meos_call": "aintersects_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event aintersects_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalECoversTPoseGeometry", + "sql_token": "TEMPORAL_ECOVERS_TPOSE_GEOMETRY", + "meos_call": "ecovers_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event ecovers_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDisjointTPoseGeometry", + "sql_token": "TEMPORAL_EDISJOINT_TPOSE_GEOMETRY", + "meos_call": "edisjoint_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event edisjoint_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADisjointTPoseGeometry", + "sql_token": "TEMPORAL_ADISJOINT_TPOSE_GEOMETRY", + "meos_call": "adisjoint_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event adisjoint_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalETouchesTPoseGeometry", + "sql_token": "TEMPORAL_ETOUCHES_TPOSE_GEOMETRY", + "meos_call": "etouches_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event etouches_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalATouchesTPoseGeometry", + "sql_token": "TEMPORAL_ATOUCHES_TPOSE_GEOMETRY", + "meos_call": "atouches_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event atouches_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEContainsTPoseGeometry", + "sql_token": "TEMPORAL_ECONTAINS_TPOSE_GEOMETRY", + "meos_call": "econtains_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event econtains_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAContainsTPoseGeometry", + "sql_token": "TEMPORAL_ACONTAINS_TPOSE_GEOMETRY", + "meos_call": "acontains_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event acontains_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDWithinTPoseGeometry", + "sql_token": "TEMPORAL_EDWITHIN_TPOSE_GEOMETRY", + "meos_call": "edwithin_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_with_dist_via_composition": true, + "comment_one_liner": "Per-event edwithin_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADWithinTPoseGeometry", + "sql_token": "TEMPORAL_ADWITHIN_TPOSE_GEOMETRY", + "meos_call": "adwithin_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tpose_point_with_dist_via_composition": true, + "comment_one_liner": "Per-event adwithin_tgeo_geo via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEIntersectsTPoseTPose", + "sql_token": "TEMPORAL_EINTERSECTS_TPOSE_TPOSE", + "meos_call": "eintersects_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event eintersects_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAIntersectsTPoseTPose", + "sql_token": "TEMPORAL_AINTERSECTS_TPOSE_TPOSE", + "meos_call": "aintersects_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event aintersects_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalECoversTPoseTPose", + "sql_token": "TEMPORAL_ECOVERS_TPOSE_TPOSE", + "meos_call": "ecovers_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event ecovers_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDisjointTPoseTPose", + "sql_token": "TEMPORAL_EDISJOINT_TPOSE_TPOSE", + "meos_call": "edisjoint_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event edisjoint_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADisjointTPoseTPose", + "sql_token": "TEMPORAL_ADISJOINT_TPOSE_TPOSE", + "meos_call": "adisjoint_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event adisjoint_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalETouchesTPoseTPose", + "sql_token": "TEMPORAL_ETOUCHES_TPOSE_TPOSE", + "meos_call": "etouches_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event etouches_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalATouchesTPoseTPose", + "sql_token": "TEMPORAL_ATOUCHES_TPOSE_TPOSE", + "meos_call": "atouches_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event atouches_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEContainsTPoseTPose", + "sql_token": "TEMPORAL_ECONTAINS_TPOSE_TPOSE", + "meos_call": "econtains_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event econtains_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAContainsTPoseTPose", + "sql_token": "TEMPORAL_ACONTAINS_TPOSE_TPOSE", + "meos_call": "acontains_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event acontains_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDWithinTPoseTPose", + "sql_token": "TEMPORAL_EDWITHIN_TPOSE_TPOSE", + "meos_call": "edwithin_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_with_dist_via_composition": true, + "comment_one_liner": "Per-event edwithin_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADWithinTPoseTPose", + "sql_token": "TEMPORAL_ADWITHIN_TPOSE_TPOSE", + "meos_call": "adwithin_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tpose_points_with_dist_via_composition": true, + "comment_one_liner": "Per-event adwithin_tgeo_tgeo via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalNADTPoseGeometry", + "sql_token": "TEMPORAL_NAD_TPOSE_GEOMETRY", + "meos_call": "nad_tgeo_geo", + "args": [ + { + "name": "x", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "y", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "theta", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tpose_point_via_composition": true, + "comment_one_liner": "Per-event nad_tgeo_geo (nearest approach distance) via tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalNADTPoseTPose", + "sql_token": "TEMPORAL_NAD_TPOSE_TPOSE", + "meos_call": "nad_tgeo_tgeo", + "args": [ + { + "name": "xA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "xB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "yB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "thetaB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_tpose_points_via_composition": true, + "comment_one_liner": "Per-event nad_tgeo_tgeo (nearest approach distance) via tpose\u00d7tpose\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEIntersectsTNpointGeometry", + "sql_token": "TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY", + "meos_call": "eintersects_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event eintersects_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAIntersectsTNpointGeometry", + "sql_token": "TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY", + "meos_call": "aintersects_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event aintersects_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalECoversTNpointGeometry", + "sql_token": "TEMPORAL_ECOVERS_TNPOINT_GEOMETRY", + "meos_call": "ecovers_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event ecovers_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDisjointTNpointGeometry", + "sql_token": "TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY", + "meos_call": "edisjoint_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event edisjoint_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADisjointTNpointGeometry", + "sql_token": "TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY", + "meos_call": "adisjoint_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event adisjoint_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalETouchesTNpointGeometry", + "sql_token": "TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY", + "meos_call": "etouches_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event etouches_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalATouchesTNpointGeometry", + "sql_token": "TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY", + "meos_call": "atouches_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event atouches_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEContainsTNpointGeometry", + "sql_token": "TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY", + "meos_call": "econtains_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event econtains_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAContainsTNpointGeometry", + "sql_token": "TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY", + "meos_call": "acontains_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event acontains_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDWithinTNpointGeometry", + "sql_token": "TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY", + "meos_call": "edwithin_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_with_dist_via_composition": true, + "comment_one_liner": "Per-event edwithin_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADWithinTNpointGeometry", + "sql_token": "TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY", + "meos_call": "adwithin_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tnpoint_point_with_dist_via_composition": true, + "comment_one_liner": "Per-event adwithin_tgeo_geo via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEIntersectsTNpointTNpoint", + "sql_token": "TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT", + "meos_call": "eintersects_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event eintersects_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAIntersectsTNpointTNpoint", + "sql_token": "TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT", + "meos_call": "aintersects_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event aintersects_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalECoversTNpointTNpoint", + "sql_token": "TEMPORAL_ECOVERS_TNPOINT_TNPOINT", + "meos_call": "ecovers_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event ecovers_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDisjointTNpointTNpoint", + "sql_token": "TEMPORAL_EDISJOINT_TNPOINT_TNPOINT", + "meos_call": "edisjoint_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event edisjoint_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADisjointTNpointTNpoint", + "sql_token": "TEMPORAL_ADISJOINT_TNPOINT_TNPOINT", + "meos_call": "adisjoint_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event adisjoint_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalETouchesTNpointTNpoint", + "sql_token": "TEMPORAL_ETOUCHES_TNPOINT_TNPOINT", + "meos_call": "etouches_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event etouches_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalATouchesTNpointTNpoint", + "sql_token": "TEMPORAL_ATOUCHES_TNPOINT_TNPOINT", + "meos_call": "atouches_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event atouches_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEContainsTNpointTNpoint", + "sql_token": "TEMPORAL_ECONTAINS_TNPOINT_TNPOINT", + "meos_call": "econtains_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event econtains_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalAContainsTNpointTNpoint", + "sql_token": "TEMPORAL_ACONTAINS_TNPOINT_TNPOINT", + "meos_call": "acontains_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event acontains_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalEDWithinTNpointTNpoint", + "sql_token": "TEMPORAL_EDWITHIN_TNPOINT_TNPOINT", + "meos_call": "edwithin_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_with_dist_via_composition": true, + "comment_one_liner": "Per-event edwithin_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalADWithinTNpointTNpoint", + "sql_token": "TEMPORAL_ADWITHIN_TNPOINT_TNPOINT", + "meos_call": "adwithin_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tnpoint_points_with_dist_via_composition": true, + "comment_one_liner": "Per-event adwithin_tgeo_tgeo via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalNADTNpointGeometry", + "sql_token": "TEMPORAL_NAD_TNPOINT_GEOMETRY", + "meos_call": "nad_tgeo_geo", + "args": [ + { + "name": "rid", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fraction", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tnpoint_point_via_composition": true, + "comment_one_liner": "Per-event nad_tgeo_geo (nearest approach distance) via tnpoint\u2192tgeompoint composition." + }, + { + "nebula_name": "TemporalNADTNpointTNpoint", + "sql_token": "TEMPORAL_NAD_TNPOINT_TNPOINT", + "meos_call": "nad_tgeo_tgeo", + "args": [ + { + "name": "ridA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "ridB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "fractionB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_tnpoint_points_via_composition": true, + "comment_one_liner": "Per-event nad_tgeo_tgeo (nearest approach distance) via tnpoint\u00d7tnpoint\u2192tgeompoint composition." + } + ] +} \ No newline at end of file diff --git a/tools/codegen/phasec-rest-descriptor.json b/tools/codegen/phasec-rest-descriptor.json new file mode 100644 index 0000000000..49d9b2dc5a --- /dev/null +++ b/tools/codegen/phasec-rest-descriptor.json @@ -0,0 +1,3583 @@ +{ + "operators": [ + { + "nebula_name": "H3indexEq", + "sql_token": "H3INDEX_EQ", + "input_type": "static_scalar", + "meos_call": "h3index_eq((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index eq comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexNe", + "sql_token": "H3INDEX_NE", + "input_type": "static_scalar", + "meos_call": "h3index_ne((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index ne comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexLt", + "sql_token": "H3INDEX_LT", + "input_type": "static_scalar", + "meos_call": "h3index_lt((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index lt comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexLe", + "sql_token": "H3INDEX_LE", + "input_type": "static_scalar", + "meos_call": "h3index_le((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index le comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexGt", + "sql_token": "H3INDEX_GT", + "input_type": "static_scalar", + "meos_call": "h3index_gt((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index gt comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexGe", + "sql_token": "H3INDEX_GE", + "input_type": "static_scalar", + "meos_call": "h3index_ge((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index ge comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexCmp", + "sql_token": "H3INDEX_CMP", + "input_type": "static_scalar", + "meos_call": "h3index_cmp((H3Index)a, (H3Index)b)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index comparison (cmp)", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "H3indexOut", + "sql_token": "H3INDEX_OUT", + "input_type": "static_scalar", + "meos_call": "h3index_out((H3Index)cell)", + "return_kind": "varsized_h3out", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "H3Index to hex string", + "primary_fields": [ + [ + "cell", + "uint64_t" + ] + ] + }, + { + "nebula_name": "Th3indexGetResolution", + "sql_token": "TH3INDEX_GET_RESOLUTION", + "input_type": "th3index", + "meos_call": "th3index_get_resolution(temp)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Th3index th3index get resolution" + }, + { + "nebula_name": "Th3indexGetBaseCellNumber", + "sql_token": "TH3INDEX_GET_BASE_CELL_NUMBER", + "input_type": "th3index", + "meos_call": "th3index_get_base_cell_number(temp)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Th3index th3index get base cell number" + }, + { + "nebula_name": "Th3indexIsValidCell", + "sql_token": "TH3INDEX_IS_VALID_CELL", + "input_type": "th3index", + "meos_call": "th3index_is_valid_cell(temp)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Th3index th3index is valid cell" + }, + { + "nebula_name": "Th3indexIsPentagon", + "sql_token": "TH3INDEX_IS_PENTAGON", + "input_type": "th3index", + "meos_call": "th3index_is_pentagon(temp)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Th3index th3index is pentagon" + }, + { + "nebula_name": "Th3indexCellToParent", + "sql_token": "TH3INDEX_CELL_TO_PARENT", + "input_type": "th3index", + "meos_call": "th3index_cell_to_parent(temp, (int32_t)arg0)", + "return_kind": "varsized_th3index", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index th3index cell to parent" + }, + { + "nebula_name": "Th3indexCellToParentNext", + "sql_token": "TH3INDEX_CELL_TO_PARENT_NEXT", + "input_type": "th3index", + "meos_call": "th3index_cell_to_parent_next(temp, (int32_t)arg0)", + "return_kind": "varsized_th3index", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index th3index cell to parent next" + }, + { + "nebula_name": "Th3indexCellToCenterChild", + "sql_token": "TH3INDEX_CELL_TO_CENTER_CHILD", + "input_type": "th3index", + "meos_call": "th3index_cell_to_center_child(temp, (int32_t)arg0)", + "return_kind": "varsized_th3index", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index th3index cell to center child" + }, + { + "nebula_name": "Th3indexCellToCenterChildNext", + "sql_token": "TH3INDEX_CELL_TO_CENTER_CHILD_NEXT", + "input_type": "th3index", + "meos_call": "th3index_cell_to_center_child_next(temp, (int32_t)arg0)", + "return_kind": "varsized_th3index", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index th3index cell to center child next" + }, + { + "nebula_name": "Th3indexCellToChildPos", + "sql_token": "TH3INDEX_CELL_TO_CHILD_POS", + "input_type": "th3index", + "meos_call": "th3index_cell_to_child_pos(temp, (int32_t)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index cell to child position" + }, + { + "nebula_name": "Th3indexAreNeighborCells", + "sql_token": "TH3INDEX_ARE_NEIGHBOR_CELLS", + "input_type": "th3index", + "meos_call": "th3index_are_neighbor_cells(temp, inst0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "th3index" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index are neighbor cells" + }, + { + "nebula_name": "Th3indexGridDistance", + "sql_token": "TH3INDEX_GRID_DISTANCE", + "input_type": "th3index", + "meos_call": "th3index_grid_distance(temp, inst0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "th3index" + } + ], + "build_generic": true, + "comment_one_liner": "Th3index grid distance" + }, + { + "nebula_name": "EverEqTh3indexH3index", + "sql_token": "EVEREQTH3INDEXH3INDEX", + "input_type": "th3index", + "meos_call": "ever_eq_th3index_h3index(temp, (H3Index)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "h3index" + } + ], + "build_generic": true, + "comment_one_liner": "Ever equal th3index vs h3index" + }, + { + "nebula_name": "EverNeTh3indexH3index", + "sql_token": "EVERNETH3INDEXH3INDEX", + "input_type": "th3index", + "meos_call": "ever_ne_th3index_h3index(temp, (H3Index)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "h3index" + } + ], + "build_generic": true, + "comment_one_liner": "Ever neual th3index vs h3index" + }, + { + "nebula_name": "AlwaysEqTh3indexH3index", + "sql_token": "ALWAYSEQTH3INDEXH3INDEX", + "input_type": "th3index", + "meos_call": "always_eq_th3index_h3index(temp, (H3Index)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "h3index" + } + ], + "build_generic": true, + "comment_one_liner": "Always equal th3index vs h3index" + }, + { + "nebula_name": "AlwaysNeTh3indexH3index", + "sql_token": "ALWAYSNETH3INDEXH3INDEX", + "input_type": "th3index", + "meos_call": "always_ne_th3index_h3index(temp, (H3Index)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_h3.h" + ], + "extra_args": [ + { + "kind": "h3index" + } + ], + "build_generic": true, + "comment_one_liner": "Always neual th3index vs h3index" + }, + { + "nebula_name": "QuadbinEq", + "sql_token": "QUADBIN_EQ", + "input_type": "static_scalar", + "meos_call": "quadbin_eq((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin eq comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinNe", + "sql_token": "QUADBIN_NE", + "input_type": "static_scalar", + "meos_call": "quadbin_ne((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin ne comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinLt", + "sql_token": "QUADBIN_LT", + "input_type": "static_scalar", + "meos_call": "quadbin_lt((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin lt comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinLe", + "sql_token": "QUADBIN_LE", + "input_type": "static_scalar", + "meos_call": "quadbin_le((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin le comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinGt", + "sql_token": "QUADBIN_GT", + "input_type": "static_scalar", + "meos_call": "quadbin_gt((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin gt comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinGe", + "sql_token": "QUADBIN_GE", + "input_type": "static_scalar", + "meos_call": "quadbin_ge((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin ge comparison", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinCmp", + "sql_token": "QUADBIN_CMP", + "input_type": "static_scalar", + "meos_call": "quadbin_cmp((Quadbin)a, (Quadbin)b)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin cmp", + "primary_fields": [ + [ + "a", + "uint64_t" + ], + [ + "b", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinGetResolution", + "sql_token": "QUADBIN_GET_RESOLUTION", + "input_type": "static_scalar", + "meos_call": "quadbin_get_resolution((Quadbin)cell)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin get resolution", + "primary_fields": [ + [ + "cell", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinIsValidCell", + "sql_token": "QUADBIN_IS_VALID_CELL", + "input_type": "static_scalar", + "meos_call": "quadbin_is_valid_cell((Quadbin)cell)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin is valid cell", + "primary_fields": [ + [ + "cell", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinCellArea", + "sql_token": "QUADBIN_CELL_AREA", + "input_type": "static_scalar", + "meos_call": "quadbin_cell_area((Quadbin)cell)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin cell area", + "primary_fields": [ + [ + "cell", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinCellToParent", + "sql_token": "QUADBIN_CELL_TO_PARENT", + "input_type": "static_scalar", + "meos_call": "quadbin_cell_to_parent((Quadbin)cell, (uint32_t)res)", + "return_kind": "varsized_quadbin", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin cell to parent", + "primary_fields": [ + [ + "cell", + "uint64_t" + ], + [ + "res", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinCellToQuadkey", + "sql_token": "QUADBIN_CELL_TO_QUADKEY", + "input_type": "static_scalar", + "meos_call": "quadbin_cell_to_quadkey((Quadbin)cell)", + "return_kind": "varsized_cstring", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin cell to quadkey", + "primary_fields": [ + [ + "cell", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinPointToCell", + "sql_token": "QUADBIN_POINT_TO_CELL", + "input_type": "static_scalar", + "meos_call": "quadbin_point_to_cell(lon, lat, (uint32_t)res)", + "return_kind": "varsized_quadbin", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin point to cell", + "primary_fields": [ + [ + "lon", + "double" + ], + [ + "lat", + "double" + ], + [ + "res", + "uint64_t" + ] + ] + }, + { + "nebula_name": "QuadbinTileToCell", + "sql_token": "QUADBIN_TILE_TO_CELL", + "input_type": "static_scalar", + "meos_call": "quadbin_tile_to_cell((uint32_t)x, (uint32_t)y, (uint32_t)z)", + "return_kind": "varsized_quadbin", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Quadbin tile to cell", + "primary_fields": [ + [ + "x", + "uint64_t" + ], + [ + "y", + "uint64_t" + ], + [ + "z", + "uint64_t" + ] + ] + }, + { + "nebula_name": "EverEqTquadbinQuadbin", + "sql_token": "EVEREQTQUADBINQUADBIN", + "input_type": "tquadbin", + "meos_call": "ever_eq_tquadbin_quadbin(temp, (Quadbin)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Ever equal tquadbin vs quadbin" + }, + { + "nebula_name": "EverNeTquadbinQuadbin", + "sql_token": "EVERNETQUADBINQUADBIN", + "input_type": "tquadbin", + "meos_call": "ever_ne_tquadbin_quadbin(temp, (Quadbin)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Ever neual tquadbin vs quadbin" + }, + { + "nebula_name": "AlwaysEqTquadbinQuadbin", + "sql_token": "ALWAYSEQTQUADBINQUADBIN", + "input_type": "tquadbin", + "meos_call": "always_eq_tquadbin_quadbin(temp, (Quadbin)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Always equal tquadbin vs quadbin" + }, + { + "nebula_name": "AlwaysNeTquadbinQuadbin", + "sql_token": "ALWAYSNETQUADBINQUADBIN", + "input_type": "tquadbin", + "meos_call": "always_ne_tquadbin_quadbin(temp, (Quadbin)arg0)", + "return_kind": "double", + "extra_headers": [ + "meos_quadbin.h" + ], + "extra_args": [ + { + "kind": "quadbin" + } + ], + "build_generic": true, + "comment_one_liner": "Always neual tquadbin vs quadbin" + }, + { + "nebula_name": "EverEqTtextText", + "sql_token": "EVEREQTTEXTTEXT", + "input_type": "ttext", + "meos_call": "ever_eq_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eqqual ttext vs text" + }, + { + "nebula_name": "EverEqTextTtext", + "sql_token": "EVEREQTEXTTTEXT", + "input_type": "ttext", + "meos_call": "ever_eq_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eqqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "EverNeTtextText", + "sql_token": "EVERNETTEXTTEXT", + "input_type": "ttext", + "meos_call": "ever_ne_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever nequal ttext vs text" + }, + { + "nebula_name": "EverNeTextTtext", + "sql_token": "EVERNETEXTTTEXT", + "input_type": "ttext", + "meos_call": "ever_ne_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever nequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "EverGeTtextText", + "sql_token": "EVERGETTEXTTEXT", + "input_type": "ttext", + "meos_call": "ever_ge_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever gequal ttext vs text" + }, + { + "nebula_name": "EverGeTextTtext", + "sql_token": "EVERGETEXTTTEXT", + "input_type": "ttext", + "meos_call": "ever_ge_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever gequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "EverGtTtextText", + "sql_token": "EVERGTTTEXTTEXT", + "input_type": "ttext", + "meos_call": "ever_gt_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever gtqual ttext vs text" + }, + { + "nebula_name": "EverGtTextTtext", + "sql_token": "EVERGTTEXTTTEXT", + "input_type": "ttext", + "meos_call": "ever_gt_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever gtqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "EverLeTtextText", + "sql_token": "EVERLETTEXTTEXT", + "input_type": "ttext", + "meos_call": "ever_le_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever lequal ttext vs text" + }, + { + "nebula_name": "EverLeTextTtext", + "sql_token": "EVERLETEXTTTEXT", + "input_type": "ttext", + "meos_call": "ever_le_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever lequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "EverLtTtextText", + "sql_token": "EVERLTTTEXTTEXT", + "input_type": "ttext", + "meos_call": "ever_lt_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ltqual ttext vs text" + }, + { + "nebula_name": "EverLtTextTtext", + "sql_token": "EVERLTTEXTTTEXT", + "input_type": "ttext", + "meos_call": "ever_lt_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ltqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "AlwaysEqTtextText", + "sql_token": "ALWAYSEQTTEXTTEXT", + "input_type": "ttext", + "meos_call": "always_eq_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always eqqual ttext vs text" + }, + { + "nebula_name": "AlwaysEqTextTtext", + "sql_token": "ALWAYSEQTEXTTTEXT", + "input_type": "ttext", + "meos_call": "always_eq_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always eqqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "AlwaysNeTtextText", + "sql_token": "ALWAYSNETTEXTTEXT", + "input_type": "ttext", + "meos_call": "always_ne_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always nequal ttext vs text" + }, + { + "nebula_name": "AlwaysNeTextTtext", + "sql_token": "ALWAYSNETEXTTTEXT", + "input_type": "ttext", + "meos_call": "always_ne_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always nequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "AlwaysGeTtextText", + "sql_token": "ALWAYSGETTEXTTEXT", + "input_type": "ttext", + "meos_call": "always_ge_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always gequal ttext vs text" + }, + { + "nebula_name": "AlwaysGeTextTtext", + "sql_token": "ALWAYSGETEXTTTEXT", + "input_type": "ttext", + "meos_call": "always_ge_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always gequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "AlwaysGtTtextText", + "sql_token": "ALWAYSGTTTEXTTEXT", + "input_type": "ttext", + "meos_call": "always_gt_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always gtqual ttext vs text" + }, + { + "nebula_name": "AlwaysGtTextTtext", + "sql_token": "ALWAYSGTTEXTTTEXT", + "input_type": "ttext", + "meos_call": "always_gt_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always gtqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "AlwaysLeTtextText", + "sql_token": "ALWAYSLETTEXTTEXT", + "input_type": "ttext", + "meos_call": "always_le_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always lequal ttext vs text" + }, + { + "nebula_name": "AlwaysLeTextTtext", + "sql_token": "ALWAYSLETEXTTTEXT", + "input_type": "ttext", + "meos_call": "always_le_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always lequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "AlwaysLtTtextText", + "sql_token": "ALWAYSLTTTEXTTEXT", + "input_type": "ttext", + "meos_call": "always_lt_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always ltqual ttext vs text" + }, + { + "nebula_name": "AlwaysLtTextTtext", + "sql_token": "ALWAYSLTTEXTTTEXT", + "input_type": "ttext", + "meos_call": "always_lt_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always ltqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "TEqTtextText", + "sql_token": "TEQ_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "teq_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal eqqual ttext vs text" + }, + { + "nebula_name": "TEqTextTtext", + "sql_token": "TEQ_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "teq_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal eqqual text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "TNeTtextText", + "sql_token": "TNE_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "tne_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal nequal ttext vs text" + }, + { + "nebula_name": "TNeTextTtext", + "sql_token": "TNE_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "tne_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal nequal text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "TtextUpper", + "sql_token": "TTEXT_UPPER", + "input_type": "ttext", + "meos_call": "ttext_upper", + "return_kind": "varsized_ttext", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Temporal text uppercase" + }, + { + "nebula_name": "TtextLower", + "sql_token": "TTEXT_LOWER", + "input_type": "ttext", + "meos_call": "ttext_lower", + "return_kind": "varsized_ttext", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Temporal text lowercase" + }, + { + "nebula_name": "TtextInitcap", + "sql_token": "TTEXT_INITCAP", + "input_type": "ttext", + "meos_call": "ttext_initcap", + "return_kind": "varsized_ttext", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Temporal text initcapcase" + }, + { + "nebula_name": "TextUpper", + "sql_token": "TEXT_UPPER", + "input_type": "text_wkt", + "meos_call": "text_upper", + "return_kind": "varsized_text", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Text uppercase" + }, + { + "nebula_name": "TextLower", + "sql_token": "TEXT_LOWER", + "input_type": "text_wkt", + "meos_call": "text_lower", + "return_kind": "varsized_text", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Text lowercase" + }, + { + "nebula_name": "TextInitcap", + "sql_token": "TEXT_INITCAP", + "input_type": "text_wkt", + "meos_call": "text_initcap", + "return_kind": "varsized_text", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Text initcapcase" + }, + { + "nebula_name": "TextcatTtextText", + "sql_token": "TEXTCAT_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "textcat_ttext_text(temp, txt0)", + "return_kind": "varsized_ttext", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Concatenate ttext and text" + }, + { + "nebula_name": "TextcatTextTtext", + "sql_token": "TEXTCAT_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "textcat_text_ttext(txt0, temp)", + "return_kind": "varsized_ttext", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Concatenate text and ttext", + "scalar_first": true + }, + { + "nebula_name": "TextcatTtextTtext", + "sql_token": "TEXTCAT_TTEXT_TTEXT", + "input_type": "ttext", + "meos_call": "textcat_ttext_ttext(temp, inst0)", + "return_kind": "varsized_ttext", + "extra_headers": [], + "extra_args": [ + { + "kind": "ttext" + } + ], + "build_generic": true, + "comment_one_liner": "Concatenate ttext and ttext" + }, + { + "nebula_name": "TGeTtextText", + "sql_token": "TGE_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "tge_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal ge ttext vs text" + }, + { + "nebula_name": "TGeTextTtext", + "sql_token": "TGE_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "tge_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal ge text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "TGtTtextText", + "sql_token": "TGT_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "tgt_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal gt ttext vs text" + }, + { + "nebula_name": "TGtTextTtext", + "sql_token": "TGT_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "tgt_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal gt text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "TLeTtextText", + "sql_token": "TLE_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "tle_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal le ttext vs text" + }, + { + "nebula_name": "TLeTextTtext", + "sql_token": "TLE_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "tle_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal le text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "TLtTtextText", + "sql_token": "TLT_TTEXT_TEXT", + "input_type": "ttext", + "meos_call": "tlt_ttext_text(temp, txt0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal lt ttext vs text" + }, + { + "nebula_name": "TLtTextTtext", + "sql_token": "TLT_TEXT_TTEXT", + "input_type": "ttext", + "meos_call": "tlt_text_ttext(txt0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Temporal lt text vs ttext", + "scalar_first": true + }, + { + "nebula_name": "JsonbEq", + "sql_token": "JSONB_EQ", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_eq(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb eq comparison" + }, + { + "nebula_name": "JsonbNe", + "sql_token": "JSONB_NE", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_ne(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb ne comparison" + }, + { + "nebula_name": "JsonbLt", + "sql_token": "JSONB_LT", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_lt(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb lt comparison" + }, + { + "nebula_name": "JsonbLe", + "sql_token": "JSONB_LE", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_le(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb le comparison" + }, + { + "nebula_name": "JsonbGt", + "sql_token": "JSONB_GT", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_gt(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb gt comparison" + }, + { + "nebula_name": "JsonbGe", + "sql_token": "JSONB_GE", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_ge(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb ge comparison" + }, + { + "nebula_name": "JsonbCmp", + "sql_token": "JSONB_CMP", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_cmp(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb cmp" + }, + { + "nebula_name": "JsonbContained", + "sql_token": "JSONB_CONTAINED", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_contained(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb contained" + }, + { + "nebula_name": "JsonbContains", + "sql_token": "JSONB_CONTAINS", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_contains(temp, jb0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb contains" + }, + { + "nebula_name": "JsonbExists", + "sql_token": "JSONB_EXISTS", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_exists(temp, txt0)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb exists key" + }, + { + "nebula_name": "JsonbArrayLength", + "sql_token": "JSONB_ARRAY_LENGTH", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_array_length(temp)", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Jsonb array length" + }, + { + "nebula_name": "JsonbToCstring", + "sql_token": "JSONB_TO_CSTRING", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_to_cstring(temp)", + "return_kind": "varsized_cstring", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Jsonb to cstring" + }, + { + "nebula_name": "JsonbPretty", + "sql_token": "JSONB_PRETTY", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_pretty(temp)", + "return_kind": "varsized_cstring", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Jsonb pretty print" + }, + { + "nebula_name": "JsonbObjectFieldText", + "sql_token": "JSONB_OBJECT_FIELD_TEXT", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_object_field_text(temp, txt0)", + "return_kind": "varsized_text", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "text_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb object field text" + }, + { + "nebula_name": "JsonbArrayElementText", + "sql_token": "JSONB_ARRAY_ELEMENT_TEXT", + "input_type": "jsonb_wkt", + "meos_call": "jsonb_array_element_text(temp, (int)idx_d)", + "return_kind": "varsized_text", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double", + "name": "idx_d" + } + ], + "build_generic": true, + "comment_one_liner": "Jsonb array element text" + }, + { + "nebula_name": "EverEqTjsonbJsonb", + "sql_token": "EVEREQTJSONBJSONB", + "input_type": "tjsonb", + "meos_call": "ever_eq_tjsonb_jsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever equal tjsonb vs jsonb" + }, + { + "nebula_name": "EverNeTjsonbJsonb", + "sql_token": "EVERNETJSONBJSONB", + "input_type": "tjsonb", + "meos_call": "ever_ne_tjsonb_jsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Ever neual tjsonb vs jsonb" + }, + { + "nebula_name": "AlwaysEqTjsonbJsonb", + "sql_token": "ALWAYSEQTJSONBJSONB", + "input_type": "tjsonb", + "meos_call": "always_eq_tjsonb_jsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always equal tjsonb vs jsonb" + }, + { + "nebula_name": "AlwaysNeTjsonbJsonb", + "sql_token": "ALWAYSNETJSONBJSONB", + "input_type": "tjsonb", + "meos_call": "always_ne_tjsonb_jsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "jsonb_varsized" + } + ], + "build_generic": true, + "comment_one_liner": "Always neual tjsonb vs jsonb" + }, + { + "nebula_name": "EverEqTjsonbTjsonb", + "sql_token": "EVEREQTJSONBTJSONB", + "input_type": "tjsonb", + "meos_call": "ever_eq_tjsonb_tjsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "tjsonb" + } + ], + "build_generic": true, + "comment_one_liner": "Ever equal tjsonb vs tjsonb" + }, + { + "nebula_name": "EverNeTjsonbTjsonb", + "sql_token": "EVERNETJSONBTJSONB", + "input_type": "tjsonb", + "meos_call": "ever_ne_tjsonb_tjsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "tjsonb" + } + ], + "build_generic": true, + "comment_one_liner": "Ever neual tjsonb vs tjsonb" + }, + { + "nebula_name": "AlwaysEqTjsonbTjsonb", + "sql_token": "ALWAYSEQTJSONBTJSONB", + "input_type": "tjsonb", + "meos_call": "always_eq_tjsonb_tjsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "tjsonb" + } + ], + "build_generic": true, + "comment_one_liner": "Always equal tjsonb vs tjsonb" + }, + { + "nebula_name": "AlwaysNeTjsonbTjsonb", + "sql_token": "ALWAYSNETJSONBTJSONB", + "input_type": "tjsonb", + "meos_call": "always_ne_tjsonb_tjsonb", + "return_kind": "double", + "extra_headers": [ + "meos_json.h" + ], + "extra_args": [ + { + "kind": "tjsonb" + } + ], + "build_generic": true, + "comment_one_liner": "Always neual tjsonb vs tjsonb" + }, + { + "nebula_name": "NadTnpointGeo", + "sql_token": "NAD_TNPOINT_GEO", + "input_type": "tnpoint", + "meos_call": "nad_tnpoint_geo(temp, gs0)", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h", + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "NAD tnpoint vs geo" + }, + { + "nebula_name": "NadTnpointNpoint", + "sql_token": "NAD_TNPOINT_NPOINT", + "input_type": "tnpoint", + "meos_call": "nad_tnpoint_npoint(temp, np0)", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "NAD tnpoint vs npoint" + }, + { + "nebula_name": "NadTnpointTnpoint", + "sql_token": "NAD_TNPOINT_TNPOINT", + "input_type": "tnpoint", + "meos_call": "nad_tnpoint_tnpoint(temp, inst0)", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "tnpoint" + } + ], + "build_generic": true, + "comment_one_liner": "NAD tnpoint vs tnpoint" + }, + { + "nebula_name": "EverEqNpointTnpoint", + "sql_token": "EVEREQNPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "ever_eq_npoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eq npoint vs tnpoint", + "scalar_first": true + }, + { + "nebula_name": "EverEqTnpointNpoint", + "sql_token": "EVEREQTNPOINTNPOINT", + "input_type": "tnpoint", + "meos_call": "ever_eq_tnpoint_npoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eq tnpoint vs npoint" + }, + { + "nebula_name": "EverEqTnpointTnpoint", + "sql_token": "EVEREQTNPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "ever_eq_tnpoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "tnpoint" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eq tnpoint vs tnpoint" + }, + { + "nebula_name": "EverNeNpointTnpoint", + "sql_token": "EVERNENPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "ever_ne_npoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ne npoint vs tnpoint", + "scalar_first": true + }, + { + "nebula_name": "EverNeTnpointNpoint", + "sql_token": "EVERNETNPOINTNPOINT", + "input_type": "tnpoint", + "meos_call": "ever_ne_tnpoint_npoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ne tnpoint vs npoint" + }, + { + "nebula_name": "EverNeTnpointTnpoint", + "sql_token": "EVERNETNPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "ever_ne_tnpoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "tnpoint" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ne tnpoint vs tnpoint" + }, + { + "nebula_name": "AlwaysEqNpointTnpoint", + "sql_token": "ALWAYSEQNPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "always_eq_npoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Always eq npoint vs tnpoint", + "scalar_first": true + }, + { + "nebula_name": "AlwaysEqTnpointNpoint", + "sql_token": "ALWAYSEQTNPOINTNPOINT", + "input_type": "tnpoint", + "meos_call": "always_eq_tnpoint_npoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Always eq tnpoint vs npoint" + }, + { + "nebula_name": "AlwaysEqTnpointTnpoint", + "sql_token": "ALWAYSEQTNPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "always_eq_tnpoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "tnpoint" + } + ], + "build_generic": true, + "comment_one_liner": "Always eq tnpoint vs tnpoint" + }, + { + "nebula_name": "AlwaysNeNpointTnpoint", + "sql_token": "ALWAYSNENPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "always_ne_npoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Always ne npoint vs tnpoint", + "scalar_first": true + }, + { + "nebula_name": "AlwaysNeTnpointNpoint", + "sql_token": "ALWAYSNETNPOINTNPOINT", + "input_type": "tnpoint", + "meos_call": "always_ne_tnpoint_npoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "npoint" + } + ], + "build_generic": true, + "comment_one_liner": "Always ne tnpoint vs npoint" + }, + { + "nebula_name": "AlwaysNeTnpointTnpoint", + "sql_token": "ALWAYSNETNPOINTTNPOINT", + "input_type": "tnpoint", + "meos_call": "always_ne_tnpoint_tnpoint", + "return_kind": "double", + "extra_headers": [ + "meos_npoint.h" + ], + "extra_args": [ + { + "kind": "tnpoint" + } + ], + "build_generic": true, + "comment_one_liner": "Always ne tnpoint vs tnpoint" + }, + { + "nebula_name": "NadTposePose", + "sql_token": "NAD_TPOSE_POSE", + "input_type": "tpose", + "meos_call": "nad_tpose_pose(temp, pose0)", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h", + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "NAD tpose vs pose" + }, + { + "nebula_name": "NadTposeTpose", + "sql_token": "NAD_TPOSE_TPOSE", + "input_type": "tpose", + "meos_call": "nad_tpose_tpose(temp, inst0)", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "tpose" + } + ], + "build_generic": true, + "comment_one_liner": "NAD tpose vs tpose" + }, + { + "nebula_name": "NadTposeGeo", + "sql_token": "NAD_TPOSE_GEO", + "input_type": "tpose", + "meos_call": "nad_tpose_geo(temp, gs0)", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h", + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "NAD tpose vs geo" + }, + { + "nebula_name": "EverEqPoseTpose", + "sql_token": "EVEREQPOSETPOSE", + "input_type": "tpose", + "meos_call": "ever_eq_pose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eq pose vs tpose", + "scalar_first": true + }, + { + "nebula_name": "EverEqTposePose", + "sql_token": "EVEREQTPOSEPOSE", + "input_type": "tpose", + "meos_call": "ever_eq_tpose_pose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eq tpose vs pose" + }, + { + "nebula_name": "EverEqTposeTpose", + "sql_token": "EVEREQTPOSETPOSE", + "input_type": "tpose", + "meos_call": "ever_eq_tpose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "tpose" + } + ], + "build_generic": true, + "comment_one_liner": "Ever eq tpose vs tpose" + }, + { + "nebula_name": "EverNePoseTpose", + "sql_token": "EVERNEPOSETPOSE", + "input_type": "tpose", + "meos_call": "ever_ne_pose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ne pose vs tpose", + "scalar_first": true + }, + { + "nebula_name": "EverNeTposePose", + "sql_token": "EVERNETPOSEPOSE", + "input_type": "tpose", + "meos_call": "ever_ne_tpose_pose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ne tpose vs pose" + }, + { + "nebula_name": "EverNeTposeTpose", + "sql_token": "EVERNETPOSETPOSE", + "input_type": "tpose", + "meos_call": "ever_ne_tpose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "tpose" + } + ], + "build_generic": true, + "comment_one_liner": "Ever ne tpose vs tpose" + }, + { + "nebula_name": "AlwaysEqPoseTpose", + "sql_token": "ALWAYSEQPOSETPOSE", + "input_type": "tpose", + "meos_call": "always_eq_pose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Always eq pose vs tpose", + "scalar_first": true + }, + { + "nebula_name": "AlwaysEqTposePose", + "sql_token": "ALWAYSEQTPOSEPOSE", + "input_type": "tpose", + "meos_call": "always_eq_tpose_pose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Always eq tpose vs pose" + }, + { + "nebula_name": "AlwaysEqTposeTpose", + "sql_token": "ALWAYSEQTPOSETPOSE", + "input_type": "tpose", + "meos_call": "always_eq_tpose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "tpose" + } + ], + "build_generic": true, + "comment_one_liner": "Always eq tpose vs tpose" + }, + { + "nebula_name": "AlwaysNePoseTpose", + "sql_token": "ALWAYSNEPOSETPOSE", + "input_type": "tpose", + "meos_call": "always_ne_pose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Always ne pose vs tpose", + "scalar_first": true + }, + { + "nebula_name": "AlwaysNeTposePose", + "sql_token": "ALWAYSNETPOSEPOSE", + "input_type": "tpose", + "meos_call": "always_ne_tpose_pose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "pose" + } + ], + "build_generic": true, + "comment_one_liner": "Always ne tpose vs pose" + }, + { + "nebula_name": "AlwaysNeTposeTpose", + "sql_token": "ALWAYSNETPOSETPOSE", + "input_type": "tpose", + "meos_call": "always_ne_tpose_tpose", + "return_kind": "double", + "extra_headers": [ + "meos_pose.h" + ], + "extra_args": [ + { + "kind": "tpose" + } + ], + "build_generic": true, + "comment_one_liner": "Always ne tpose vs tpose" + }, + { + "nebula_name": "GeomBoundary", + "sql_token": "GEOMBOUNDARY", + "input_type": "geom_wkt", + "meos_call": "geom_boundary", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry geom boundary" + }, + { + "nebula_name": "GeomCentroid", + "sql_token": "GEOMCENTROID", + "input_type": "geom_wkt", + "meos_call": "geom_centroid", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry geom centroid" + }, + { + "nebula_name": "GeomConvexHull", + "sql_token": "GEOMCONVEXHULL", + "input_type": "geom_wkt", + "meos_call": "geom_convex_hull", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry geom convex hull" + }, + { + "nebula_name": "GeoReverse", + "sql_token": "GEOREVERSE", + "input_type": "geom_wkt", + "meos_call": "geo_reverse", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry geo reverse" + }, + { + "nebula_name": "GeoPoints", + "sql_token": "GEOPOINTS", + "input_type": "geom_wkt", + "meos_call": "geo_points", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry geo points" + }, + { + "nebula_name": "GeomUnaryUnion", + "sql_token": "GEOMUNARYUNION", + "input_type": "geom_wkt", + "meos_call": "geom_unary_union", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry geom unary union" + }, + { + "nebula_name": "GeoSetSrid", + "sql_token": "GEO_SET_SRID", + "input_type": "geom_wkt", + "meos_call": "geo_set_srid(temp, (int32_t)srid)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "uint64_scalar", + "cast": "int32_t" + } + ], + "build_generic": true, + "comment_one_liner": "Set geometry SRID" + }, + { + "nebula_name": "GeoRound", + "sql_token": "GEO_ROUND", + "input_type": "geom_wkt", + "meos_call": "geo_round(temp, (int)dec)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Round geometry coordinates" + }, + { + "nebula_name": "GeoTransform", + "sql_token": "GEO_TRANSFORM", + "input_type": "geom_wkt", + "meos_call": "geo_transform(temp, (int32_t)srid)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "uint64_scalar", + "cast": "int32_t" + } + ], + "build_generic": true, + "comment_one_liner": "Transform geometry SRID" + }, + { + "nebula_name": "GeoSrid", + "sql_token": "GEOSRID", + "input_type": "geom_wkt", + "meos_call": "geo_srid", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Get geometry SRID" + }, + { + "nebula_name": "GeoNumGeos", + "sql_token": "GEONUMGEOS", + "input_type": "geom_wkt", + "meos_call": "geo_num_geos", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Count geometry components" + }, + { + "nebula_name": "GeoNumPoints", + "sql_token": "GEONUMPOINTS", + "input_type": "geom_wkt", + "meos_call": "geo_num_points", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Count geometry points" + }, + { + "nebula_name": "GeomLength", + "sql_token": "GEOMLENGTH", + "input_type": "geom_wkt", + "meos_call": "geom_length", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry length" + }, + { + "nebula_name": "GeomPerimeter", + "sql_token": "GEOMPERIMETER", + "input_type": "geom_wkt", + "meos_call": "geom_perimeter", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry perimeter" + }, + { + "nebula_name": "GeomIsEmpty", + "sql_token": "GEOMISEMPTY", + "input_type": "geom_wkt", + "meos_call": "geom_is_empty", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Is geometry empty" + }, + { + "nebula_name": "GeomAzimuth", + "sql_token": "GEOMAZIMUTH", + "input_type": "geom_wkt", + "meos_call": "geom_azimuth", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Geometry azimuth (single point)" + }, + { + "nebula_name": "GeoIsUnitary", + "sql_token": "GEOISUNITARY", + "input_type": "geom_wkt", + "meos_call": "geo_is_unitary", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Is geometry unitary" + }, + { + "nebula_name": "GeoEquals", + "sql_token": "GEOEQUALS", + "input_type": "geom_wkt", + "meos_call": "geom_equals", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry equals" + }, + { + "nebula_name": "GeoSame", + "sql_token": "GEOSAME", + "input_type": "geom_wkt", + "meos_call": "geo_same", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry same" + }, + { + "nebula_name": "GeomIntersects", + "sql_token": "GEOMINTERSECTS", + "input_type": "geom_wkt", + "meos_call": "geom_intersects", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry intersects" + }, + { + "nebula_name": "GeomIntersects2d", + "sql_token": "GEOMINTERSECTS2D", + "input_type": "geom_wkt", + "meos_call": "geom_intersects2d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry intersects 2D" + }, + { + "nebula_name": "GeomIntersects3d", + "sql_token": "GEOMINTERSECTS3D", + "input_type": "geom_wkt", + "meos_call": "geom_intersects3d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry intersects 3D" + }, + { + "nebula_name": "GeomContains", + "sql_token": "GEOMCONTAINS", + "input_type": "geom_wkt", + "meos_call": "geom_contains", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry contains" + }, + { + "nebula_name": "GeomCovers", + "sql_token": "GEOMCOVERS", + "input_type": "geom_wkt", + "meos_call": "geom_covers", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry covers" + }, + { + "nebula_name": "GeomDisjoint2d", + "sql_token": "GEOMDISJOINT2D", + "input_type": "geom_wkt", + "meos_call": "geom_disjoint2d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry disjoint 2D" + }, + { + "nebula_name": "GeomTouches", + "sql_token": "GEOMTOUCHES", + "input_type": "geom_wkt", + "meos_call": "geom_touches", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry touches" + }, + { + "nebula_name": "GeogIntersects", + "sql_token": "GEOGINTERSECTS", + "input_type": "geom_wkt", + "meos_call": "geog_intersects", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geography intersects" + }, + { + "nebula_name": "GeogDistance", + "sql_token": "GEOGDISTANCE", + "input_type": "geom_wkt", + "meos_call": "geog_distance", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geography distance" + }, + { + "nebula_name": "LineLocatePoint", + "sql_token": "LINELOCATEPOINT", + "input_type": "geom_wkt", + "meos_call": "line_locate_point", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Locate point on line" + }, + { + "nebula_name": "GeomDistance2d", + "sql_token": "GEOMDISTANCE2D", + "input_type": "geom_wkt", + "meos_call": "geom_distance2d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry 2D distance" + }, + { + "nebula_name": "GeomDistance3d", + "sql_token": "GEOMDISTANCE3D", + "input_type": "geom_wkt", + "meos_call": "geom_distance3d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry 3D distance" + }, + { + "nebula_name": "GeomDwithin2d", + "sql_token": "GEOMDWITHIN2D", + "input_type": "geom_wkt", + "meos_call": "geom_dwithin2d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + }, + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "geom_dwithin2d with distance" + }, + { + "nebula_name": "GeomDwithin3d", + "sql_token": "GEOMDWITHIN3D", + "input_type": "geom_wkt", + "meos_call": "geom_dwithin3d", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + }, + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "geom_dwithin3d with distance" + }, + { + "nebula_name": "GeogDwithin", + "sql_token": "GEOGDWITHIN", + "input_type": "geom_wkt", + "meos_call": "geog_dwithin", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + }, + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "geog_dwithin with distance" + }, + { + "nebula_name": "GeomDwithin", + "sql_token": "GEOMDWITHIN", + "input_type": "geom_wkt", + "meos_call": "geom_dwithin", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + }, + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "geom_dwithin with distance" + }, + { + "nebula_name": "GeomIntersection2d", + "sql_token": "GEOMINTERSECTION2D", + "input_type": "geom_wkt", + "meos_call": "geom_intersection2d", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "geom_intersection2d" + }, + { + "nebula_name": "GeomIntersection2dColl", + "sql_token": "GEOMINTERSECTION2DCOLL", + "input_type": "geom_wkt", + "meos_call": "geom_intersection2d_coll", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "geom_intersection2d_coll" + }, + { + "nebula_name": "GeomDifference2d", + "sql_token": "GEOMDIFFERENCE2D", + "input_type": "geom_wkt", + "meos_call": "geom_difference2d", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "geom_difference2d" + }, + { + "nebula_name": "GeomShortestline2d", + "sql_token": "GEOMSHORTESTLINE2D", + "input_type": "geom_wkt", + "meos_call": "geom_shortestline2d", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "geom_shortestline2d" + }, + { + "nebula_name": "GeomShortestline3d", + "sql_token": "GEOMSHORTESTLINE3D", + "input_type": "geom_wkt", + "meos_call": "geom_shortestline3d", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "geom_wkt" + } + ], + "build_generic": true, + "comment_one_liner": "geom_shortestline3d" + }, + { + "nebula_name": "LineInterpolatePoint", + "sql_token": "LINE_INTERPOLATE_POINT", + "input_type": "geom_wkt", + "meos_call": "line_interpolate_point(temp, arg0)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Interpolate point on line" + }, + { + "nebula_name": "LineSubstring", + "sql_token": "LINE_SUBSTRING", + "input_type": "geom_wkt", + "meos_call": "line_substring(temp, arg0, arg1)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + }, + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Line substring" + }, + { + "nebula_name": "LineNumpoints", + "sql_token": "LINE_NUMPOINTS", + "input_type": "geom_wkt", + "meos_call": "line_numpoints(temp)", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Line num points" + }, + { + "nebula_name": "LinePointN", + "sql_token": "LINE_POINT_N", + "input_type": "geom_wkt", + "meos_call": "line_point_n(temp, (int)arg0)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Nth point on line" + }, + { + "nebula_name": "GeoGeoN", + "sql_token": "GEO_GEO_N", + "input_type": "geom_wkt", + "meos_call": "geo_geo_n(temp, (int)arg0)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Nth geometry in collection" + }, + { + "nebula_name": "GeoAsEwkt", + "sql_token": "GEO_AS_EWKT", + "input_type": "geom_wkt", + "meos_call": "geo_as_ewkt(temp, (int)arg0)", + "return_kind": "varsized_cstring", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry as EWKT" + }, + { + "nebula_name": "GeoAsGeojson", + "sql_token": "GEO_AS_GEOJSON", + "input_type": "geom_wkt", + "meos_call": "geo_as_geojson(temp, (int)arg0, (int)arg1, nullptr)", + "return_kind": "varsized_cstring", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "int_scalar" + }, + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Geometry as GeoJSON" + }, + { + "nebula_name": "GeomPointMake2d", + "sql_token": "GEOM_POINT_MAKE2D", + "input_type": "static_scalar", + "meos_call": "geompoint_make2d((int32_t)srid, x, y)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Make 2D geometry point", + "primary_fields": [ + [ + "srid", + "uint64_t" + ], + [ + "x", + "double" + ], + [ + "y", + "double" + ] + ] + }, + { + "nebula_name": "GeomPointMake3dz", + "sql_token": "GEOM_POINT_MAKE3DZ", + "input_type": "static_scalar", + "meos_call": "geompoint_make3dz((int32_t)srid, x, y, z)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Make 3D geometry point", + "primary_fields": [ + [ + "srid", + "uint64_t" + ], + [ + "x", + "double" + ], + [ + "y", + "double" + ], + [ + "z", + "double" + ] + ] + }, + { + "nebula_name": "GeogPointMake2d", + "sql_token": "GEOG_POINT_MAKE2D", + "input_type": "static_scalar", + "meos_call": "geogpoint_make2d((int32_t)srid, x, y)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Make 2D geography point", + "primary_fields": [ + [ + "srid", + "uint64_t" + ], + [ + "x", + "double" + ], + [ + "y", + "double" + ] + ] + }, + { + "nebula_name": "GeogPointMake3dz", + "sql_token": "GEOG_POINT_MAKE3DZ", + "input_type": "static_scalar", + "meos_call": "geogpoint_make3dz((int32_t)srid, x, y, z)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Make 3D geography point", + "primary_fields": [ + [ + "srid", + "uint64_t" + ], + [ + "x", + "double" + ], + [ + "y", + "double" + ], + [ + "z", + "double" + ] + ] + }, + { + "nebula_name": "GeogArea", + "sql_token": "GEOGAREA", + "input_type": "geog_wkt", + "meos_call": "geog_area", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "geog area" + }, + { + "nebula_name": "GeogLength", + "sql_token": "GEOGLENGTH", + "input_type": "geog_wkt", + "meos_call": "geog_length", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "geog length" + }, + { + "nebula_name": "GeogPerimeter", + "sql_token": "GEOGPERIMETER", + "input_type": "geog_wkt", + "meos_call": "geog_perimeter", + "return_kind": "double", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "geog perimeter" + }, + { + "nebula_name": "GeogToGeom", + "sql_token": "GEOGTOGEOM", + "input_type": "geog_wkt", + "meos_call": "geog_to_geom", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "geog to geom" + }, + { + "nebula_name": "GeomToGeog", + "sql_token": "GEOMTOGEOG", + "input_type": "geog_wkt", + "meos_call": "geom_to_geog", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "geom to geog" + }, + { + "nebula_name": "GeogCentroid", + "sql_token": "GEOG_CENTROID", + "input_type": "geog_wkt", + "meos_call": "geog_centroid(temp, (bool)arg0)", + "return_kind": "varsized_geom", + "extra_headers": [ + "meos_geo.h" + ], + "extra_args": [ + { + "kind": "bool_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Geography centroid" + }, + { + "nebula_name": "IntspanLower", + "sql_token": "INTSPANLOWER", + "input_type": "intspan_wkt", + "meos_call": "intspan_lower", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Intspan lower" + }, + { + "nebula_name": "IntspanUpper", + "sql_token": "INTSPANUPPER", + "input_type": "intspan_wkt", + "meos_call": "intspan_upper", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Intspan upper" + }, + { + "nebula_name": "IntspanWidth", + "sql_token": "INTSPANWIDTH", + "input_type": "intspan_wkt", + "meos_call": "intspan_width", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Intspan width" + }, + { + "nebula_name": "IntspanLowerInc", + "sql_token": "INTSPANLOWERINC", + "input_type": "intspan_wkt", + "meos_call": "span_lower_inc", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Intspan lower_inc" + }, + { + "nebula_name": "IntspanUpperInc", + "sql_token": "INTSPANUPPERINC", + "input_type": "intspan_wkt", + "meos_call": "span_upper_inc", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Intspan upper_inc" + }, + { + "nebula_name": "FloatspanLower", + "sql_token": "FLOATSPANLOWER", + "input_type": "floatspan_wkt", + "meos_call": "floatspan_lower", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Floatspan lower" + }, + { + "nebula_name": "FloatspanUpper", + "sql_token": "FLOATSPANUPPER", + "input_type": "floatspan_wkt", + "meos_call": "floatspan_upper", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Floatspan upper" + }, + { + "nebula_name": "FloatspanWidth", + "sql_token": "FLOATSPANWIDTH", + "input_type": "floatspan_wkt", + "meos_call": "floatspan_width", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Floatspan width" + }, + { + "nebula_name": "FloatspanLowerInc", + "sql_token": "FLOATSPANLOWERINC", + "input_type": "floatspan_wkt", + "meos_call": "span_lower_inc", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Floatspan lower_inc" + }, + { + "nebula_name": "FloatspanUpperInc", + "sql_token": "FLOATSPANUPPERINC", + "input_type": "floatspan_wkt", + "meos_call": "span_upper_inc", + "return_kind": "double", + "extra_headers": [], + "extra_args": [], + "build_generic": true, + "comment_one_liner": "Floatspan upper_inc" + }, + { + "nebula_name": "ContainedIntSpan", + "sql_token": "CONTAINED_INT_SPAN", + "input_type": "intspan_wkt", + "meos_call": "contained_int_span((int)arg0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Int contained in span", + "scalar_first": true + }, + { + "nebula_name": "ContainedFloatSpan", + "sql_token": "CONTAINED_FLOAT_SPAN", + "input_type": "floatspan_wkt", + "meos_call": "contained_float_span(arg0, temp)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Float contained in span", + "scalar_first": true + }, + { + "nebula_name": "ContainedSpanSpan", + "sql_token": "CONTAINED_SPAN_SPAN", + "input_type": "intspan_wkt", + "meos_call": "contained_span_span(temp, sp0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "box", + "box_type": "Span", + "parser": "intspan_in" + } + ], + "build_generic": true, + "comment_one_liner": "Intspan contained in intspan" + }, + { + "nebula_name": "ContainedFloatspanSpan", + "sql_token": "CONTAINED_FLOATSPAN_SPAN", + "input_type": "floatspan_wkt", + "meos_call": "contained_span_span(temp, sp0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "box", + "box_type": "Span", + "parser": "floatspan_in" + } + ], + "build_generic": true, + "comment_one_liner": "Floatspan contained in floatspan" + }, + { + "nebula_name": "ContainsSpanInt", + "sql_token": "CONTAINS_SPAN_INT", + "input_type": "intspan_wkt", + "meos_call": "contains_span_int(temp, (int)arg0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "int_scalar" + } + ], + "build_generic": true, + "comment_one_liner": "Intspan contains int" + }, + { + "nebula_name": "ContainsSpanFloat", + "sql_token": "CONTAINS_SPAN_FLOAT", + "input_type": "floatspan_wkt", + "meos_call": "contains_span_float(temp, arg0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "scalar", + "cpp": "double" + } + ], + "build_generic": true, + "comment_one_liner": "Floatspan contains float" + }, + { + "nebula_name": "ContainsSpanSpan", + "sql_token": "CONTAINS_SPAN_SPAN", + "input_type": "intspan_wkt", + "meos_call": "contains_span_span(temp, sp0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "box", + "box_type": "Span", + "parser": "intspan_in" + } + ], + "build_generic": true, + "comment_one_liner": "Intspan contains intspan" + }, + { + "nebula_name": "ContainsFloatspanSpan", + "sql_token": "CONTAINS_FLOATSPAN_SPAN", + "input_type": "floatspan_wkt", + "meos_call": "contains_span_span(temp, sp0)", + "return_kind": "double", + "extra_headers": [], + "extra_args": [ + { + "kind": "box", + "box_type": "Span", + "parser": "floatspan_in" + } + ], + "build_generic": true, + "comment_one_liner": "Floatspan contains floatspan" + } + ] +} \ No newline at end of file diff --git a/tools/codegen/spatial-phasec-full-descriptor.json b/tools/codegen/spatial-phasec-full-descriptor.json new file mode 100644 index 0000000000..73e4177047 --- /dev/null +++ b/tools/codegen/spatial-phasec-full-descriptor.json @@ -0,0 +1,2660 @@ +{ + "_comment": "Phase C full spatial descriptor: tgeo_geo (14 ops, excl. AcoversGeoTgeo), tgeo_tgeo (18 ops), tcbuffer_geo (13 ops), tcbuffer_tcbuffer (18 ops). tcbuffer_cbuffer excluded (arity mismatch: 5-arg blob vs committed 7-arg coordinates).", + "operators": [ + { + "nebula_name": "AcontainsTgeoGeo", + "sql_token": "ACONTAINS_TGEO_GEO", + "meos_call": "acontains_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event acontains_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AcoversTgeoGeo", + "sql_token": "ACOVERS_TGEO_GEO", + "meos_call": "acovers_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event acovers_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AdisjointTgeoGeo", + "sql_token": "ADISJOINT_TGEO_GEO", + "meos_call": "adisjoint_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event adisjoint_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AintersectsTgeoGeo", + "sql_token": "AINTERSECTS_TGEO_GEO", + "meos_call": "aintersects_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event aintersects_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AtouchesTgeoGeo", + "sql_token": "ATOUCHES_TGEO_GEO", + "meos_call": "atouches_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event atouches_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EcontainsTgeoGeo", + "sql_token": "ECONTAINS_TGEO_GEO", + "meos_call": "econtains_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event econtains_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EcoversTgeoGeo", + "sql_token": "ECOVERS_TGEO_GEO", + "meos_call": "ecovers_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event ecovers_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EdisjointTgeoGeo", + "sql_token": "EDISJOINT_TGEO_GEO", + "meos_call": "edisjoint_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event edisjoint_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EintersectsTgeoGeo", + "sql_token": "EINTERSECTS_TGEO_GEO", + "meos_call": "eintersects_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event eintersects_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EtouchesTgeoGeo", + "sql_token": "ETOUCHES_TGEO_GEO", + "meos_call": "etouches_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event etouches_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EverEqTgeoGeo", + "sql_token": "EVER_EQ_TGEO_GEO", + "meos_call": "ever_eq_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event ever_eq_tgeo_geo spatial predicate." + }, + { + "nebula_name": "EverNeTgeoGeo", + "sql_token": "EVER_NE_TGEO_GEO", + "meos_call": "ever_ne_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event ever_ne_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AlwaysEqTgeoGeo", + "sql_token": "ALWAYS_EQ_TGEO_GEO", + "meos_call": "always_eq_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event always_eq_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AlwaysNeTgeoGeo", + "sql_token": "ALWAYS_NE_TGEO_GEO", + "meos_call": "always_ne_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event always_ne_tgeo_geo spatial predicate." + }, + { + "nebula_name": "NadTgeoGeo", + "sql_token": "NAD_TGEO_GEO", + "meos_call": "nad_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_temporal_point": true, + "comment_one_liner": "Per-event nearest approach distance between tgeo and static geometry." + }, + { + "nebula_name": "EdwithinTgeoGeo", + "sql_token": "EDWITHIN_TGEO_GEO", + "meos_call": "edwithin_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_with_dist": true, + "comment_one_liner": "Per-event edwithin_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AdwithinTgeoGeo", + "sql_token": "ADWITHIN_TGEO_GEO", + "meos_call": "adwithin_tgeo_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_with_dist": true, + "comment_one_liner": "Per-event adwithin_tgeo_geo spatial predicate." + }, + { + "nebula_name": "AcontainsTgeoTgeo", + "sql_token": "ACONTAINS_TGEO_TGEO", + "meos_call": "acontains_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event acontains_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AcoversTgeoTgeo", + "sql_token": "ACOVERS_TGEO_TGEO", + "meos_call": "acovers_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event acovers_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AdisjointTgeoTgeo", + "sql_token": "ADISJOINT_TGEO_TGEO", + "meos_call": "adisjoint_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event adisjoint_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AintersectsTgeoTgeo", + "sql_token": "AINTERSECTS_TGEO_TGEO", + "meos_call": "aintersects_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event aintersects_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AtouchesTgeoTgeo", + "sql_token": "ATOUCHES_TGEO_TGEO", + "meos_call": "atouches_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event atouches_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EcontainsTgeoTgeo", + "sql_token": "ECONTAINS_TGEO_TGEO", + "meos_call": "econtains_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event econtains_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EcoversTgeoTgeo", + "sql_token": "ECOVERS_TGEO_TGEO", + "meos_call": "ecovers_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ecovers_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EdisjointTgeoTgeo", + "sql_token": "EDISJOINT_TGEO_TGEO", + "meos_call": "edisjoint_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event edisjoint_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EintersectsTgeoTgeo", + "sql_token": "EINTERSECTS_TGEO_TGEO", + "meos_call": "eintersects_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event eintersects_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EtouchesTgeoTgeo", + "sql_token": "ETOUCHES_TGEO_TGEO", + "meos_call": "etouches_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event etouches_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EverEqTgeoTgeo", + "sql_token": "EVER_EQ_TGEO_TGEO", + "meos_call": "ever_eq_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_eq_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "EverNeTgeoTgeo", + "sql_token": "EVER_NE_TGEO_TGEO", + "meos_call": "ever_ne_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event ever_ne_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AlwaysEqTgeoTgeo", + "sql_token": "ALWAYS_EQ_TGEO_TGEO", + "meos_call": "always_eq_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_eq_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AlwaysNeTgeoTgeo", + "sql_token": "ALWAYS_NE_TGEO_TGEO", + "meos_call": "always_ne_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event always_ne_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "NadTgeoTgeo", + "sql_token": "NAD_TGEO_TGEO", + "meos_call": "nad_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event nearest approach distance between two tgeo instants." + }, + { + "nebula_name": "EdwithinTgeoTgeo", + "sql_token": "EDWITHIN_TGEO_TGEO", + "meos_call": "edwithin_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points_with_dist": true, + "comment_one_liner": "Per-event edwithin_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AdwithinTgeoTgeo", + "sql_token": "ADWITHIN_TGEO_TGEO", + "meos_call": "adwithin_tgeo_tgeo", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_temporal_points_with_dist": true, + "comment_one_liner": "Per-event adwithin_tgeo_tgeo spatial predicate." + }, + { + "nebula_name": "AcontainsTcbufferGeo", + "sql_token": "ACONTAINS_TCBUFFER_GEO", + "meos_call": "acontains_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event acontains_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "AcoversTcbufferGeo", + "sql_token": "ACOVERS_TCBUFFER_GEO", + "meos_call": "acovers_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event acovers_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "AdisjointTcbufferGeo", + "sql_token": "ADISJOINT_TCBUFFER_GEO", + "meos_call": "adisjoint_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event adisjoint_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "AintersectsTcbufferGeo", + "sql_token": "AINTERSECTS_TCBUFFER_GEO", + "meos_call": "aintersects_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event aintersects_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "AtouchesTcbufferGeo", + "sql_token": "ATOUCHES_TCBUFFER_GEO", + "meos_call": "atouches_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event atouches_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "EcontainsTcbufferGeo", + "sql_token": "ECONTAINS_TCBUFFER_GEO", + "meos_call": "econtains_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event econtains_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "EcoversTcbufferGeo", + "sql_token": "ECOVERS_TCBUFFER_GEO", + "meos_call": "ecovers_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event ecovers_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "EdisjointTcbufferGeo", + "sql_token": "EDISJOINT_TCBUFFER_GEO", + "meos_call": "edisjoint_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event edisjoint_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "EintersectsTcbufferGeo", + "sql_token": "EINTERSECTS_TCBUFFER_GEO", + "meos_call": "eintersects_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event eintersects_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "EtouchesTcbufferGeo", + "sql_token": "ETOUCHES_TCBUFFER_GEO", + "meos_call": "etouches_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event etouches_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "NadTcbufferGeo", + "sql_token": "NAD_TCBUFFER_GEO", + "meos_call": "nad_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_tcbuffer_point": true, + "comment_one_liner": "Per-event nearest approach distance between tcbuffer and static geometry." + }, + { + "nebula_name": "EdwithinTcbufferGeo", + "sql_token": "EDWITHIN_TCBUFFER_GEO", + "meos_call": "edwithin_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_with_dist": true, + "comment_one_liner": "Per-event edwithin_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "AdwithinTcbufferGeo", + "sql_token": "ADWITHIN_TCBUFFER_GEO", + "meos_call": "adwithin_tcbuffer_geo", + "args": [ + { + "name": "lon", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "lat", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radius", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "timestamp", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "geometry", + "nautilus_type": "VariableSizedData", + "cpp_type": "const char*" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_with_dist": true, + "comment_one_liner": "Per-event adwithin_tcbuffer_geo spatial predicate." + }, + { + "nebula_name": "AcontainsTcbufferTcbuffer", + "sql_token": "ACONTAINS_TCBUFFER_TCBUFFER", + "meos_call": "acontains_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event acontains_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AcoversTcbufferTcbuffer", + "sql_token": "ACOVERS_TCBUFFER_TCBUFFER", + "meos_call": "acovers_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event acovers_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AdisjointTcbufferTcbuffer", + "sql_token": "ADISJOINT_TCBUFFER_TCBUFFER", + "meos_call": "adisjoint_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event adisjoint_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AintersectsTcbufferTcbuffer", + "sql_token": "AINTERSECTS_TCBUFFER_TCBUFFER", + "meos_call": "aintersects_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event aintersects_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AtouchesTcbufferTcbuffer", + "sql_token": "ATOUCHES_TCBUFFER_TCBUFFER", + "meos_call": "atouches_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event atouches_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EcontainsTcbufferTcbuffer", + "sql_token": "ECONTAINS_TCBUFFER_TCBUFFER", + "meos_call": "econtains_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event econtains_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EcoversTcbufferTcbuffer", + "sql_token": "ECOVERS_TCBUFFER_TCBUFFER", + "meos_call": "ecovers_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event ecovers_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EdisjointTcbufferTcbuffer", + "sql_token": "EDISJOINT_TCBUFFER_TCBUFFER", + "meos_call": "edisjoint_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event edisjoint_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EintersectsTcbufferTcbuffer", + "sql_token": "EINTERSECTS_TCBUFFER_TCBUFFER", + "meos_call": "eintersects_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event eintersects_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EtouchesTcbufferTcbuffer", + "sql_token": "ETOUCHES_TCBUFFER_TCBUFFER", + "meos_call": "etouches_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event etouches_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EverEqTcbufferTcbuffer", + "sql_token": "EVER_EQ_TCBUFFER_TCBUFFER", + "meos_call": "ever_eq_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event ever_eq_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "EverNeTcbufferTcbuffer", + "sql_token": "EVER_NE_TCBUFFER_TCBUFFER", + "meos_call": "ever_ne_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event ever_ne_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AlwaysEqTcbufferTcbuffer", + "sql_token": "ALWAYS_EQ_TCBUFFER_TCBUFFER", + "meos_call": "always_eq_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event always_eq_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AlwaysNeTcbufferTcbuffer", + "sql_token": "ALWAYS_NE_TCBUFFER_TCBUFFER", + "meos_call": "always_ne_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event always_ne_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "NadTcbufferTcbuffer", + "sql_token": "NAD_TCBUFFER_TCBUFFER", + "meos_call": "nad_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event nearest approach distance between two tcbuffer instants." + }, + { + "nebula_name": "EdwithinTcbufferTcbuffer", + "sql_token": "EDWITHIN_TCBUFFER_TCBUFFER", + "meos_call": "edwithin_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points_with_dist": true, + "comment_one_liner": "Per-event edwithin_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "AdwithinTcbufferTcbuffer", + "sql_token": "ADWITHIN_TCBUFFER_TCBUFFER", + "meos_call": "adwithin_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points_with_dist": true, + "comment_one_liner": "Per-event adwithin_tcbuffer_tcbuffer spatial predicate." + }, + { + "nebula_name": "MindistanceTcbufferTcbuffer", + "sql_token": "MINDISTANCE_TCBUFFER_TCBUFFER", + "meos_call": "mindistance_tcbuffer_tcbuffer", + "args": [ + { + "name": "lonA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusA", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsA", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "lonB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "latB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "radiusB", + "nautilus_type": "double", + "cpp_type": "double" + }, + { + "name": "tsB", + "nautilus_type": "uint64_t", + "cpp_type": "uint64_t" + }, + { + "name": "dist", + "nautilus_type": "double", + "cpp_type": "double" + } + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_tcbuffer_points_with_dist": true, + "comment_one_liner": "Per-event minimum distance between two tcbuffer instants within threshold." + } + ] +} diff --git a/tools/codegen/spatial-predicates-descriptor.json b/tools/codegen/spatial-predicates-descriptor.json new file mode 100644 index 0000000000..7bbedfd950 --- /dev/null +++ b/tools/codegen/spatial-predicates-descriptor.json @@ -0,0 +1,159 @@ +{ + "_comment": "Spatial predicate descriptor for 9 missing tgeo/tcbuffer operators (W148-wave gap-fill); input verify/nebula-gen-spatial", + "operators": [ + { + "nebula_name": "EcoversTgeoGeo", + "sql_token": "ECOVERS_TGEO_GEO", + "meos_call": "ecovers_tgeo_geo", + "args": [ + {"name": "lon", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "lat", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "timestamp", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "geometry", "nautilus_type": "VariableSizedData", "cpp_type": "const char*"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event ever-covers between a single-instant tgeo built from event fields and a static geometry." + }, + { + "nebula_name": "EdisjointTgeoGeo", + "sql_token": "EDISJOINT_TGEO_GEO", + "meos_call": "edisjoint_tgeo_geo", + "args": [ + {"name": "lon", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "lat", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "timestamp", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "geometry", "nautilus_type": "VariableSizedData", "cpp_type": "const char*"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point": true, + "comment_one_liner": "Per-event ever-disjoint between a single-instant tgeo built from event fields and a static geometry." + }, + { + "nebula_name": "EdwithinTgeoGeo", + "sql_token": "EDWITHIN_TGEO_GEO", + "meos_call": "edwithin_tgeo_geo", + "args": [ + {"name": "lon", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "lat", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "timestamp", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "geometry", "nautilus_type": "VariableSizedData", "cpp_type": "const char*"}, + {"name": "dist", "nautilus_type": "double", "cpp_type": "double"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_temporal_point_with_dist": true, + "comment_one_liner": "Per-event ever-within-distance between a single-instant tgeo and a static geometry." + }, + { + "nebula_name": "NadTgeoTgeo", + "sql_token": "NAD_TGEO_TGEO", + "meos_call": "nad_tgeo_tgeo", + "args": [ + {"name": "lonA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsA", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "lonB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsB", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"} + ], + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_two_temporal_points": true, + "comment_one_liner": "Per-event nearest-approach distance between two single-instant tgeo built from event fields." + }, + { + "nebula_name": "EcontainsTcbufferTcbuffer", + "sql_token": "ECONTAINS_TCBUFFER_TCBUFFER", + "meos_call": "econtains_tcbuffer_tcbuffer", + "args": [ + {"name": "lonA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radiusA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsA", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "lonB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radiusB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsB", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event ever-contains between two single-instant tcbuffer built from event fields." + }, + { + "nebula_name": "AcontainsTcbufferTcbuffer", + "sql_token": "ACONTAINS_TCBUFFER_TCBUFFER", + "meos_call": "acontains_tcbuffer_tcbuffer", + "args": [ + {"name": "lonA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radiusA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsA", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "lonB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radiusB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsB", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event always-contains between two single-instant tcbuffer built from event fields." + }, + { + "nebula_name": "EdisjointTcbufferTcbuffer", + "sql_token": "EDISJOINT_TCBUFFER_TCBUFFER", + "meos_call": "edisjoint_tcbuffer_tcbuffer", + "args": [ + {"name": "lonA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radiusA", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsA", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "lonB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "latB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radiusB", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "tsB", "nautilus_type": "uint64_t", "cpp_type": "uint64_t"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_two_tcbuffer_points": true, + "comment_one_liner": "Per-event ever-disjoint between two single-instant tcbuffer built from event fields." + }, + { + "nebula_name": "EdwithinTcbufferCbuffer", + "sql_token": "EDWITHIN_TCBUFFER_CBUFFER", + "meos_call": "edwithin_tcbuffer_cbuffer", + "args": [ + {"name": "lon", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "lat", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radius", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "timestamp","nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "cbufLit", "nautilus_type": "VariableSizedData", "cpp_type": "const char*"}, + {"name": "dist", "nautilus_type": "double", "cpp_type": "double"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer_with_dist": true, + "comment_one_liner": "Per-event ever-within-distance between a single-instant tcbuffer and a static cbuffer." + }, + { + "nebula_name": "AdwithinTcbufferCbuffer", + "sql_token": "ADWITHIN_TCBUFFER_CBUFFER", + "meos_call": "adwithin_tcbuffer_cbuffer", + "args": [ + {"name": "lon", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "lat", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "radius", "nautilus_type": "double", "cpp_type": "double"}, + {"name": "timestamp","nautilus_type": "uint64_t", "cpp_type": "uint64_t"}, + {"name": "cbufLit", "nautilus_type": "VariableSizedData", "cpp_type": "const char*"}, + {"name": "dist", "nautilus_type": "double", "cpp_type": "double"} + ], + "return_type": "int", + "nautilus_return": "INT32", + "build_tcbuffer_point_cbuffer_with_dist": true, + "comment_one_liner": "Per-event always-within-distance between a single-instant tcbuffer and a static cbuffer." + } + ] +} diff --git a/tools/codegen/tfloat-transforms-descriptor.json b/tools/codegen/tfloat-transforms-descriptor.json new file mode 100644 index 0000000000..31db94d4fe --- /dev/null +++ b/tools/codegen/tfloat-transforms-descriptor.json @@ -0,0 +1,85 @@ +{ + "_comment": "tfloat/tint unary transform family descriptor (8 ops)", + "operators": [ + { + "nebula_name": "TfloatCeil", + "sql_token": "TFLOAT_CEIL", + "meos_call": "tfloat_ceil", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_ceil: single-instant tfloat transform, value extracted -> double." + }, + { + "nebula_name": "TfloatExp", + "sql_token": "TFLOAT_EXP", + "meos_call": "tfloat_exp", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_exp: single-instant tfloat transform, value extracted -> double." + }, + { + "nebula_name": "TfloatFloor", + "sql_token": "TFLOAT_FLOOR", + "meos_call": "tfloat_floor", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_floor: single-instant tfloat transform, value extracted -> double." + }, + { + "nebula_name": "TfloatLn", + "sql_token": "TFLOAT_LN", + "meos_call": "tfloat_ln", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_ln: single-instant tfloat transform, value extracted -> double." + }, + { + "nebula_name": "TfloatLog10", + "sql_token": "TFLOAT_LOG10", + "meos_call": "tfloat_log10", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_log10: single-instant tfloat transform, value extracted -> double." + }, + { + "nebula_name": "TfloatRadians", + "sql_token": "TFLOAT_RADIANS", + "meos_call": "tfloat_radians", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tfloat_radians: single-instant tfloat transform, value extracted -> double." + }, + { + "nebula_name": "TfloatToTint", + "sql_token": "TFLOAT_TO_TINT", + "meos_call": "tfloat_to_tint", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_int", + "comment_one_liner": "Per-event tfloat_to_tint: single-instant tfloat transform, value extracted -> int." + }, + { + "nebula_name": "TintToTfloat", + "sql_token": "TINT_TO_TFLOAT", + "meos_call": "tint_to_tfloat", + "build_generic": true, + "input_type": "tfloat", + "extra_args": [], + "return_kind": "extract_double", + "comment_one_liner": "Per-event tint_to_tfloat: single-instant tfloat transform, value extracted -> double." + } + ] +} diff --git a/tools/codegen/trgeo-descriptor.json b/tools/codegen/trgeo-descriptor.json new file mode 100644 index 0000000000..015f98474b --- /dev/null +++ b/tools/codegen/trgeo-descriptor.json @@ -0,0 +1,311 @@ +{ + "_comment": "codegen descriptor; shapes=trgeometry_geo_predicate,geo_trgeometry_predicate,trgeometry_geo_dwithin,trgeometry_trgeometry_predicate,trgeometry_trgeometry_dwithin,trgeometry_nad", + "operators": [ + { + "nebula_name": "AcontainsGeoTrgeometry", + "sql_token": "ACONTAINS_GEO_TRGEOMETRY", + "meos_call": "acontains_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry": true, + "comment_one_liner": "Returns 1 if the geometry acontains the trgeometry instant." + }, + { + "nebula_name": "AcoversGeoTrgeometry", + "sql_token": "ACOVERS_GEO_TRGEOMETRY", + "meos_call": "acovers_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry": true, + "comment_one_liner": "Returns 1 if the geometry acovers the trgeometry instant." + }, + { + "nebula_name": "AcoversTrgeometryGeo", + "sql_token": "ACOVERS_TRGEOMETRY_GEO", + "meos_call": "acovers_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant acovers the geometry." + }, + { + "nebula_name": "AdisjointTrgeometryGeo", + "sql_token": "ADISJOINT_TRGEOMETRY_GEO", + "meos_call": "adisjoint_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant adisjoint the geometry." + }, + { + "nebula_name": "AdisjointTrgeometryTrgeometry", + "sql_token": "ADISJOINT_TRGEOMETRY_TRGEOMETRY", + "meos_call": "adisjoint_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry": true, + "comment_one_liner": "Returns 1 if the two trgeometry instants adisjoint." + }, + { + "nebula_name": "AdwithinTrgeometryGeo", + "sql_token": "ADWITHIN_TRGEOMETRY_GEO", + "meos_call": "adwithin_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_with_dist": true, + "comment_one_liner": "Returns 1 if the trgeometry instant is within dist of the geometry (adwithin)." + }, + { + "nebula_name": "AdwithinTrgeometryTrgeometry", + "sql_token": "ADWITHIN_TRGEOMETRY_TRGEOMETRY", + "meos_call": "adwithin_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_with_dist": true, + "comment_one_liner": "Returns 1 if the two trgeometry instants are within dist (adwithin)." + }, + { + "nebula_name": "AintersectsTrgeometryGeo", + "sql_token": "AINTERSECTS_TRGEOMETRY_GEO", + "meos_call": "aintersects_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant aintersects the geometry." + }, + { + "nebula_name": "AintersectsTrgeometryTrgeometry", + "sql_token": "AINTERSECTS_TRGEOMETRY_TRGEOMETRY", + "meos_call": "aintersects_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry": true, + "comment_one_liner": "Returns 1 if the two trgeometry instants aintersects." + }, + { + "nebula_name": "AlwaysEqGeoTrgeometry", + "sql_token": "ALWAYS_EQ_GEO_TRGEOMETRY", + "meos_call": "always_eq_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry_eq": true, + "comment_one_liner": "Returns 1.0 if the static geometry is always equal to the 2D trgeometry instant." + }, + { + "nebula_name": "AlwaysEqTrgeometryGeo", + "sql_token": "ALWAYS_EQ_TRGEOMETRY_GEO", + "meos_call": "always_eq_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_nad": true, + "comment_one_liner": "Returns 1.0 if the 2D trgeometry instant is always equal to the static geometry." + }, + { + "nebula_name": "AlwaysEqTrgeometryTrgeometry", + "sql_token": "ALWAYS_EQ_TRGEOMETRY_TRGEOMETRY", + "meos_call": "always_eq_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_nad": true, + "comment_one_liner": "Returns 1.0 if the two 2D trgeometry instants are always equal." + }, + { + "nebula_name": "AlwaysNeGeoTrgeometry", + "sql_token": "ALWAYS_NE_GEO_TRGEOMETRY", + "meos_call": "always_ne_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry_eq": true, + "comment_one_liner": "Returns 1.0 if the static geometry is always not equal to the 2D trgeometry instant." + }, + { + "nebula_name": "AlwaysNeTrgeometryGeo", + "sql_token": "ALWAYS_NE_TRGEOMETRY_GEO", + "meos_call": "always_ne_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_nad": true, + "comment_one_liner": "Returns 1.0 if the 2D trgeometry instant is always not equal to the static geometry." + }, + { + "nebula_name": "AlwaysNeTrgeometryTrgeometry", + "sql_token": "ALWAYS_NE_TRGEOMETRY_TRGEOMETRY", + "meos_call": "always_ne_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_nad": true, + "comment_one_liner": "Returns 1.0 if the two 2D trgeometry instants are always not equal." + }, + { + "nebula_name": "AtouchesTrgeometryGeo", + "sql_token": "ATOUCHES_TRGEOMETRY_GEO", + "meos_call": "atouches_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant atouches the geometry." + }, + { + "nebula_name": "EcontainsGeoTrgeometry", + "sql_token": "ECONTAINS_GEO_TRGEOMETRY", + "meos_call": "econtains_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry": true, + "comment_one_liner": "Returns 1 if the geometry econtains the trgeometry instant." + }, + { + "nebula_name": "EcoversGeoTrgeometry", + "sql_token": "ECOVERS_GEO_TRGEOMETRY", + "meos_call": "ecovers_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry": true, + "comment_one_liner": "Returns 1 if the geometry ecovers the trgeometry instant." + }, + { + "nebula_name": "EcoversTrgeometryGeo", + "sql_token": "ECOVERS_TRGEOMETRY_GEO", + "meos_call": "ecovers_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant ecovers the geometry." + }, + { + "nebula_name": "EdisjointTrgeometryGeo", + "sql_token": "EDISJOINT_TRGEOMETRY_GEO", + "meos_call": "edisjoint_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant edisjoint the geometry." + }, + { + "nebula_name": "EdisjointTrgeometryTrgeometry", + "sql_token": "EDISJOINT_TRGEOMETRY_TRGEOMETRY", + "meos_call": "edisjoint_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry": true, + "comment_one_liner": "Returns 1 if the two trgeometry instants edisjoint." + }, + { + "nebula_name": "EdwithinTrgeometryGeo", + "sql_token": "EDWITHIN_TRGEOMETRY_GEO", + "meos_call": "edwithin_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_with_dist": true, + "comment_one_liner": "Returns 1 if the trgeometry instant is within dist of the geometry (edwithin)." + }, + { + "nebula_name": "EdwithinTrgeometryTrgeometry", + "sql_token": "EDWITHIN_TRGEOMETRY_TRGEOMETRY", + "meos_call": "edwithin_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_with_dist": true, + "comment_one_liner": "Returns 1 if the two trgeometry instants are within dist (edwithin)." + }, + { + "nebula_name": "EintersectsTrgeometryGeo", + "sql_token": "EINTERSECTS_TRGEOMETRY_GEO", + "meos_call": "eintersects_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant eintersects the geometry." + }, + { + "nebula_name": "EintersectsTrgeometryTrgeometry", + "sql_token": "EINTERSECTS_TRGEOMETRY_TRGEOMETRY", + "meos_call": "eintersects_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry": true, + "comment_one_liner": "Returns 1 if the two trgeometry instants eintersects." + }, + { + "nebula_name": "EtouchesTrgeometryGeo", + "sql_token": "ETOUCHES_TRGEOMETRY_GEO", + "meos_call": "etouches_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo": true, + "comment_one_liner": "Returns 1 if the trgeometry instant etouches the geometry." + }, + { + "nebula_name": "EverEqGeoTrgeometry", + "sql_token": "EVER_EQ_GEO_TRGEOMETRY", + "meos_call": "ever_eq_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry_eq": true, + "comment_one_liner": "Returns 1.0 if the static geometry is ever equal to the 2D trgeometry instant." + }, + { + "nebula_name": "EverEqTrgeometryGeo", + "sql_token": "EVER_EQ_TRGEOMETRY_GEO", + "meos_call": "ever_eq_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_nad": true, + "comment_one_liner": "Returns 1.0 if the 2D trgeometry instant is ever equal to the static geometry." + }, + { + "nebula_name": "EverEqTrgeometryTrgeometry", + "sql_token": "EVER_EQ_TRGEOMETRY_TRGEOMETRY", + "meos_call": "ever_eq_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_nad": true, + "comment_one_liner": "Returns 1.0 if the two 2D trgeometry instants are ever equal." + }, + { + "nebula_name": "EverNeGeoTrgeometry", + "sql_token": "EVER_NE_GEO_TRGEOMETRY", + "meos_call": "ever_ne_geo_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_geo_trgeometry_eq": true, + "comment_one_liner": "Returns 1.0 if the static geometry is ever not equal to the 2D trgeometry instant." + }, + { + "nebula_name": "EverNeTrgeometryGeo", + "sql_token": "EVER_NE_TRGEOMETRY_GEO", + "meos_call": "ever_ne_trgeometry_geo", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_geo_nad": true, + "comment_one_liner": "Returns 1.0 if the 2D trgeometry instant is ever not equal to the static geometry." + }, + { + "nebula_name": "EverNeTrgeometryTrgeometry", + "sql_token": "EVER_NE_TRGEOMETRY_TRGEOMETRY", + "meos_call": "ever_ne_trgeometry_trgeometry", + "return_type": "int", + "nautilus_return": "INT32", + "build_trgeometry_trgeometry_nad": true, + "comment_one_liner": "Returns 1.0 if the two 2D trgeometry instants are ever not equal." + }, + { + "nebula_name": "NadTrgeometryGeo", + "sql_token": "NAD_TRGEOMETRY_GEO", + "meos_call": "nad_trgeometry_geo", + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_nad_trgeometry_geo": true, + "comment_one_liner": "Returns the nearest approach distance between a 2D trgeometry instant and a static geometry." + }, + { + "nebula_name": "NadTrgeometryTrgeometry", + "sql_token": "NAD_TRGEOMETRY_TRGEOMETRY", + "meos_call": "nad_trgeometry_trgeometry", + "return_type": "double", + "nautilus_return": "FLOAT64", + "build_nad_trgeometry_trgeometry": true, + "comment_one_liner": "Returns the nearest approach distance between two 2D trgeometry instants." + } + ] +} \ No newline at end of file From 0494b29e7aa765fdf17b5508f6eb71965aae8ab0 Mon Sep 17 00:00:00 2001 From: Esteban Zimanyi Date: Thu, 2 Jul 2026 16:42:23 +0200 Subject: [PATCH 3/3] feat(nebula): full canonical per-event operator surface generated from the master IDL The complete per-event MEOS operator surface is generated onto main by tools/codegen/gen_all.py from the committed master IDL descriptors. Logical and physical operator layers, the CMakeLists plugin registrations, and the AntlrSQL grammar and parser dispatch glue are all emitted from the descriptors, with the physical MEOS operators gated behind NES_ENABLE_MEOS. --- .../Meos/AboveStboxStboxLogicalFunction.hpp | 53 + .../AboveStboxTspatialLogicalFunction.hpp | 55 + .../AboveTspatialStboxLogicalFunction.hpp | 55 + .../AboveTspatialTspatialLogicalFunction.hpp | 57 + .../AcontainsGeoTrgeometryLogicalFunction.hpp | 45 + .../AcontainsTcbufferGeoLogicalFunction.hpp | 56 + ...ontainsTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/AcontainsTgeoGeoLogicalFunction.hpp | 55 + .../Meos/AcontainsTgeoTgeoLogicalFunction.hpp | 57 + .../AcoversGeoTrgeometryLogicalFunction.hpp | 45 + .../AcoversTcbufferGeoLogicalFunction.hpp | 56 + ...AcoversTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/AcoversTgeoGeoLogicalFunction.hpp | 55 + .../Meos/AcoversTgeoTgeoLogicalFunction.hpp | 57 + .../AcoversTrgeometryGeoLogicalFunction.hpp | 45 + .../Meos/AddBigintTbigintLogicalFunction.hpp | 54 + .../Meos/AddFloatTfloatLogicalFunction.hpp | 54 + .../Meos/AddIntTintLogicalFunction.hpp | 54 + .../Meos/AddTbigintBigintLogicalFunction.hpp | 54 + .../Meos/AddTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AddTintIntLogicalFunction.hpp | 54 + .../Meos/AddTnumberTnumberLogicalFunction.hpp | 53 + .../AdisjointTcbufferGeoLogicalFunction.hpp | 56 + ...isjointTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/AdisjointTgeoGeoLogicalFunction.hpp | 55 + .../Meos/AdisjointTgeoTgeoLogicalFunction.hpp | 57 + .../AdisjointTrgeometryGeoLogicalFunction.hpp | 45 + ...intTrgeometryTrgeometryLogicalFunction.hpp | 45 + .../AdjacentStboxStboxLogicalFunction.hpp | 53 + .../AdjacentStboxTspatialLogicalFunction.hpp | 55 + .../AdjacentTboxTnumberLogicalFunction.hpp | 54 + ...djacentTemporalTemporalLogicalFunction.hpp | 57 + .../AdjacentTnumberTboxLogicalFunction.hpp | 54 + .../AdjacentTnumberTnumberLogicalFunction.hpp | 53 + .../AdjacentTspatialStboxLogicalFunction.hpp | 55 + ...djacentTspatialTspatialLogicalFunction.hpp | 57 + ...AdwithinTcbufferCbufferLogicalFunction.hpp | 57 + .../AdwithinTcbufferGeoLogicalFunction.hpp | 57 + ...dwithinTcbufferTcbufferLogicalFunction.hpp | 60 + .../Meos/AdwithinTgeoGeoLogicalFunction.hpp | 56 + .../Meos/AdwithinTgeoTgeoLogicalFunction.hpp | 58 + .../AdwithinTrgeometryGeoLogicalFunction.hpp | 45 + ...hinTrgeometryTrgeometryLogicalFunction.hpp | 45 + .../Meos/AfterStboxStboxLogicalFunction.hpp | 53 + .../AfterStboxTspatialLogicalFunction.hpp | 55 + .../Meos/AfterTboxTnumberLogicalFunction.hpp | 54 + .../AfterTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AfterTnumberTboxLogicalFunction.hpp | 54 + .../AfterTnumberTnumberLogicalFunction.hpp | 53 + .../AfterTspatialStboxLogicalFunction.hpp | 55 + .../AfterTspatialTspatialLogicalFunction.hpp | 57 + .../AintersectsTcbufferGeoLogicalFunction.hpp | 56 + ...ersectsTcbufferTcbufferLogicalFunction.hpp | 59 + .../AintersectsTgeoGeoLogicalFunction.hpp | 55 + .../AintersectsTgeoTgeoLogicalFunction.hpp | 57 + ...intersectsTrgeometryGeoLogicalFunction.hpp | 45 + ...ctsTrgeometryTrgeometryLogicalFunction.hpp | 45 + .../AlwaysEqBigintTbigintLogicalFunction.hpp | 54 + .../Meos/AlwaysEqBoolTboolLogicalFunction.hpp | 54 + .../AlwaysEqFloatTfloatLogicalFunction.hpp | 54 + .../AlwaysEqGeoTrgeometryLogicalFunction.hpp | 48 + .../Meos/AlwaysEqIntTintLogicalFunction.hpp | 54 + .../AlwaysEqNpointTnpointLogicalFunction.hpp | 56 + .../Meos/AlwaysEqPoseTposeLogicalFunction.hpp | 58 + .../AlwaysEqTbigintBigintLogicalFunction.hpp | 54 + .../Meos/AlwaysEqTboolBoolLogicalFunction.hpp | 54 + ...AlwaysEqTcbufferCbufferLogicalFunction.hpp | 56 + ...lwaysEqTcbufferTcbufferLogicalFunction.hpp | 59 + ...lwaysEqTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AlwaysEqTextTtextLogicalFunction.hpp | 54 + .../AlwaysEqTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AlwaysEqTgeoGeoLogicalFunction.hpp | 55 + .../Meos/AlwaysEqTgeoTgeoLogicalFunction.hpp | 57 + ...AlwaysEqTh3indexH3indexLogicalFunction.hpp | 54 + .../Meos/AlwaysEqTintIntLogicalFunction.hpp | 54 + .../AlwaysEqTjsonbJsonbLogicalFunction.hpp | 54 + .../AlwaysEqTjsonbTjsonbLogicalFunction.hpp | 55 + .../AlwaysEqTnpointNpointLogicalFunction.hpp | 56 + .../AlwaysEqTnpointTnpointLogicalFunction.hpp | 57 + .../Meos/AlwaysEqTposePoseLogicalFunction.hpp | 58 + .../AlwaysEqTposeTposeLogicalFunction.hpp | 59 + ...AlwaysEqTquadbinQuadbinLogicalFunction.hpp | 54 + .../AlwaysEqTrgeometryGeoLogicalFunction.hpp | 48 + ...sEqTrgeometryTrgeometryLogicalFunction.hpp | 48 + .../Meos/AlwaysEqTtextTextLogicalFunction.hpp | 54 + .../AlwaysGeBigintTbigintLogicalFunction.hpp | 54 + .../AlwaysGeFloatTfloatLogicalFunction.hpp | 54 + .../Meos/AlwaysGeIntTintLogicalFunction.hpp | 54 + .../AlwaysGeTbigintBigintLogicalFunction.hpp | 54 + ...lwaysGeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AlwaysGeTextTtextLogicalFunction.hpp | 54 + .../AlwaysGeTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AlwaysGeTintIntLogicalFunction.hpp | 54 + .../Meos/AlwaysGeTtextTextLogicalFunction.hpp | 54 + .../AlwaysGtBigintTbigintLogicalFunction.hpp | 54 + .../AlwaysGtFloatTfloatLogicalFunction.hpp | 54 + .../Meos/AlwaysGtIntTintLogicalFunction.hpp | 54 + .../AlwaysGtTbigintBigintLogicalFunction.hpp | 54 + ...lwaysGtTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AlwaysGtTextTtextLogicalFunction.hpp | 54 + .../AlwaysGtTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AlwaysGtTintIntLogicalFunction.hpp | 54 + .../Meos/AlwaysGtTtextTextLogicalFunction.hpp | 54 + .../AlwaysLeBigintTbigintLogicalFunction.hpp | 54 + .../AlwaysLeFloatTfloatLogicalFunction.hpp | 54 + .../Meos/AlwaysLeIntTintLogicalFunction.hpp | 54 + .../AlwaysLeTbigintBigintLogicalFunction.hpp | 54 + ...lwaysLeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AlwaysLeTextTtextLogicalFunction.hpp | 54 + .../AlwaysLeTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AlwaysLeTintIntLogicalFunction.hpp | 54 + .../Meos/AlwaysLeTtextTextLogicalFunction.hpp | 54 + .../AlwaysLtBigintTbigintLogicalFunction.hpp | 54 + .../AlwaysLtFloatTfloatLogicalFunction.hpp | 54 + .../Meos/AlwaysLtIntTintLogicalFunction.hpp | 54 + .../AlwaysLtTbigintBigintLogicalFunction.hpp | 54 + ...lwaysLtTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AlwaysLtTextTtextLogicalFunction.hpp | 54 + .../AlwaysLtTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AlwaysLtTintIntLogicalFunction.hpp | 54 + .../Meos/AlwaysLtTtextTextLogicalFunction.hpp | 54 + .../AlwaysNeBigintTbigintLogicalFunction.hpp | 54 + .../Meos/AlwaysNeBoolTboolLogicalFunction.hpp | 54 + .../AlwaysNeFloatTfloatLogicalFunction.hpp | 54 + .../AlwaysNeGeoTrgeometryLogicalFunction.hpp | 48 + .../Meos/AlwaysNeIntTintLogicalFunction.hpp | 54 + .../AlwaysNeNpointTnpointLogicalFunction.hpp | 56 + .../Meos/AlwaysNePoseTposeLogicalFunction.hpp | 58 + .../AlwaysNeTbigintBigintLogicalFunction.hpp | 54 + .../Meos/AlwaysNeTboolBoolLogicalFunction.hpp | 54 + ...AlwaysNeTcbufferCbufferLogicalFunction.hpp | 56 + ...lwaysNeTcbufferTcbufferLogicalFunction.hpp | 59 + ...lwaysNeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/AlwaysNeTextTtextLogicalFunction.hpp | 54 + .../AlwaysNeTfloatFloatLogicalFunction.hpp | 54 + .../Meos/AlwaysNeTgeoGeoLogicalFunction.hpp | 55 + .../Meos/AlwaysNeTgeoTgeoLogicalFunction.hpp | 57 + ...AlwaysNeTh3indexH3indexLogicalFunction.hpp | 54 + .../Meos/AlwaysNeTintIntLogicalFunction.hpp | 54 + .../AlwaysNeTjsonbJsonbLogicalFunction.hpp | 54 + .../AlwaysNeTjsonbTjsonbLogicalFunction.hpp | 55 + .../AlwaysNeTnpointNpointLogicalFunction.hpp | 56 + .../AlwaysNeTnpointTnpointLogicalFunction.hpp | 57 + .../Meos/AlwaysNeTposePoseLogicalFunction.hpp | 58 + .../AlwaysNeTposeTposeLogicalFunction.hpp | 59 + ...AlwaysNeTquadbinQuadbinLogicalFunction.hpp | 54 + .../AlwaysNeTrgeometryGeoLogicalFunction.hpp | 48 + ...sNeTrgeometryTrgeometryLogicalFunction.hpp | 48 + .../Meos/AlwaysNeTtextTextLogicalFunction.hpp | 54 + .../AtouchesTcbufferGeoLogicalFunction.hpp | 56 + ...touchesTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/AtouchesTgeoGeoLogicalFunction.hpp | 55 + .../Meos/AtouchesTgeoTgeoLogicalFunction.hpp | 57 + .../Meos/AtouchesTpointGeoLogicalFunction.hpp | 55 + .../AtouchesTrgeometryGeoLogicalFunction.hpp | 45 + .../Meos/BackStboxStboxLogicalFunction.hpp | 53 + .../Meos/BackStboxTspatialLogicalFunction.hpp | 55 + .../Meos/BackTspatialStboxLogicalFunction.hpp | 55 + .../BackTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/BeforeStboxStboxLogicalFunction.hpp | 53 + .../BeforeStboxTspatialLogicalFunction.hpp | 55 + .../Meos/BeforeTboxTnumberLogicalFunction.hpp | 54 + .../BeforeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/BeforeTnumberTboxLogicalFunction.hpp | 54 + .../BeforeTnumberTnumberLogicalFunction.hpp | 53 + .../BeforeTspatialStboxLogicalFunction.hpp | 55 + .../BeforeTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/BelowStboxStboxLogicalFunction.hpp | 53 + .../BelowStboxTspatialLogicalFunction.hpp | 55 + .../BelowTspatialStboxLogicalFunction.hpp | 55 + .../BelowTspatialTspatialLogicalFunction.hpp | 57 + .../ContainedFloatSpanLogicalFunction.hpp | 53 + .../ContainedFloatspanSpanLogicalFunction.hpp | 53 + .../Meos/ContainedIntSpanLogicalFunction.hpp | 53 + .../Meos/ContainedSpanSpanLogicalFunction.hpp | 53 + .../ContainedStboxStboxLogicalFunction.hpp | 53 + .../ContainedStboxTspatialLogicalFunction.hpp | 55 + .../ContainedTboxTnumberLogicalFunction.hpp | 54 + ...ntainedTemporalTemporalLogicalFunction.hpp | 57 + .../ContainedTnumberTboxLogicalFunction.hpp | 54 + ...ContainedTnumberTnumberLogicalFunction.hpp | 53 + .../ContainedTspatialStboxLogicalFunction.hpp | 55 + ...ntainedTspatialTspatialLogicalFunction.hpp | 57 + .../ContainsFloatspanSpanLogicalFunction.hpp | 53 + .../Meos/ContainsSpanFloatLogicalFunction.hpp | 53 + .../Meos/ContainsSpanIntLogicalFunction.hpp | 53 + .../Meos/ContainsSpanSpanLogicalFunction.hpp | 53 + .../ContainsStboxStboxLogicalFunction.hpp | 53 + .../ContainsStboxTspatialLogicalFunction.hpp | 55 + .../ContainsTboxTnumberLogicalFunction.hpp | 54 + ...ontainsTemporalTemporalLogicalFunction.hpp | 57 + .../ContainsTnumberTboxLogicalFunction.hpp | 54 + .../ContainsTnumberTnumberLogicalFunction.hpp | 53 + .../ContainsTspatialStboxLogicalFunction.hpp | 55 + ...ontainsTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/DivBigintTbigintLogicalFunction.hpp | 54 + .../Meos/DivFloatTfloatLogicalFunction.hpp | 54 + .../Meos/DivIntTintLogicalFunction.hpp | 54 + .../Meos/DivTbigintBigintLogicalFunction.hpp | 54 + .../Meos/DivTfloatFloatLogicalFunction.hpp | 54 + .../Meos/DivTintIntLogicalFunction.hpp | 54 + .../Meos/DivTnumberTnumberLogicalFunction.hpp | 53 + .../EcontainsGeoTrgeometryLogicalFunction.hpp | 45 + .../EcontainsTcbufferGeoLogicalFunction.hpp | 56 + ...ontainsTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/EcontainsTgeoGeoLogicalFunction.hpp | 55 + .../Meos/EcontainsTgeoTgeoLogicalFunction.hpp | 57 + .../EcoversGeoTrgeometryLogicalFunction.hpp | 45 + .../EcoversTcbufferGeoLogicalFunction.hpp | 56 + ...EcoversTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/EcoversTgeoGeoLogicalFunction.hpp | 55 + .../Meos/EcoversTgeoTgeoLogicalFunction.hpp | 57 + .../EcoversTrgeometryGeoLogicalFunction.hpp | 45 + .../EdisjointTcbufferGeoLogicalFunction.hpp | 56 + ...isjointTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/EdisjointTgeoGeoLogicalFunction.hpp | 55 + .../Meos/EdisjointTgeoTgeoLogicalFunction.hpp | 57 + .../EdisjointTrgeometryGeoLogicalFunction.hpp | 45 + ...intTrgeometryTrgeometryLogicalFunction.hpp | 45 + ...EdwithinTcbufferCbufferLogicalFunction.hpp | 57 + .../EdwithinTcbufferGeoLogicalFunction.hpp | 57 + ...dwithinTcbufferTcbufferLogicalFunction.hpp | 60 + .../Meos/EdwithinTgeoGeoLogicalFunction.hpp | 56 + .../Meos/EdwithinTgeoTgeoLogicalFunction.hpp | 58 + .../EdwithinTrgeometryGeoLogicalFunction.hpp | 45 + ...hinTrgeometryTrgeometryLogicalFunction.hpp | 45 + .../EintersectsTcbufferGeoLogicalFunction.hpp | 56 + ...ersectsTcbufferTcbufferLogicalFunction.hpp | 59 + .../EintersectsTgeoGeoLogicalFunction.hpp | 55 + .../EintersectsTgeoTgeoLogicalFunction.hpp | 57 + ...intersectsTrgeometryGeoLogicalFunction.hpp | 45 + ...ctsTrgeometryTrgeometryLogicalFunction.hpp | 45 + .../EtouchesTcbufferGeoLogicalFunction.hpp | 56 + ...touchesTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/EtouchesTgeoGeoLogicalFunction.hpp | 55 + .../Meos/EtouchesTgeoTgeoLogicalFunction.hpp | 57 + .../Meos/EtouchesTpointGeoLogicalFunction.hpp | 55 + .../EtouchesTrgeometryGeoLogicalFunction.hpp | 45 + .../EverEqBigintTbigintLogicalFunction.hpp | 54 + .../Meos/EverEqBoolTboolLogicalFunction.hpp | 54 + .../Meos/EverEqFloatTfloatLogicalFunction.hpp | 54 + .../EverEqGeoTrgeometryLogicalFunction.hpp | 48 + .../Meos/EverEqIntTintLogicalFunction.hpp | 54 + .../EverEqNpointTnpointLogicalFunction.hpp | 56 + .../Meos/EverEqPoseTposeLogicalFunction.hpp | 58 + .../EverEqTbigintBigintLogicalFunction.hpp | 54 + .../Meos/EverEqTboolBoolLogicalFunction.hpp | 54 + .../EverEqTcbufferCbufferLogicalFunction.hpp | 56 + .../EverEqTcbufferTcbufferLogicalFunction.hpp | 59 + .../EverEqTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/EverEqTextTtextLogicalFunction.hpp | 54 + .../Meos/EverEqTfloatFloatLogicalFunction.hpp | 54 + .../Meos/EverEqTgeoGeoLogicalFunction.hpp | 55 + .../Meos/EverEqTgeoTgeoLogicalFunction.hpp | 57 + .../EverEqTh3indexH3indexLogicalFunction.hpp | 54 + .../Meos/EverEqTintIntLogicalFunction.hpp | 54 + .../Meos/EverEqTjsonbJsonbLogicalFunction.hpp | 54 + .../EverEqTjsonbTjsonbLogicalFunction.hpp | 55 + .../EverEqTnpointNpointLogicalFunction.hpp | 56 + .../EverEqTnpointTnpointLogicalFunction.hpp | 57 + .../Meos/EverEqTposePoseLogicalFunction.hpp | 58 + .../Meos/EverEqTposeTposeLogicalFunction.hpp | 59 + .../EverEqTquadbinQuadbinLogicalFunction.hpp | 54 + .../EverEqTrgeometryGeoLogicalFunction.hpp | 48 + ...rEqTrgeometryTrgeometryLogicalFunction.hpp | 48 + .../Meos/EverEqTtextTextLogicalFunction.hpp | 54 + .../EverGeBigintTbigintLogicalFunction.hpp | 54 + .../Meos/EverGeFloatTfloatLogicalFunction.hpp | 54 + .../Meos/EverGeIntTintLogicalFunction.hpp | 54 + .../EverGeTbigintBigintLogicalFunction.hpp | 54 + .../EverGeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/EverGeTextTtextLogicalFunction.hpp | 54 + .../Meos/EverGeTfloatFloatLogicalFunction.hpp | 54 + .../Meos/EverGeTintIntLogicalFunction.hpp | 54 + .../Meos/EverGeTtextTextLogicalFunction.hpp | 54 + .../EverGtBigintTbigintLogicalFunction.hpp | 54 + .../Meos/EverGtFloatTfloatLogicalFunction.hpp | 54 + .../Meos/EverGtIntTintLogicalFunction.hpp | 54 + .../EverGtTbigintBigintLogicalFunction.hpp | 54 + .../EverGtTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/EverGtTextTtextLogicalFunction.hpp | 54 + .../Meos/EverGtTfloatFloatLogicalFunction.hpp | 54 + .../Meos/EverGtTintIntLogicalFunction.hpp | 54 + .../Meos/EverGtTtextTextLogicalFunction.hpp | 54 + .../EverLeBigintTbigintLogicalFunction.hpp | 54 + .../Meos/EverLeFloatTfloatLogicalFunction.hpp | 54 + .../Meos/EverLeIntTintLogicalFunction.hpp | 54 + .../EverLeTbigintBigintLogicalFunction.hpp | 54 + .../EverLeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/EverLeTextTtextLogicalFunction.hpp | 54 + .../Meos/EverLeTfloatFloatLogicalFunction.hpp | 54 + .../Meos/EverLeTintIntLogicalFunction.hpp | 54 + .../Meos/EverLeTtextTextLogicalFunction.hpp | 54 + .../EverLtBigintTbigintLogicalFunction.hpp | 54 + .../Meos/EverLtFloatTfloatLogicalFunction.hpp | 54 + .../Meos/EverLtIntTintLogicalFunction.hpp | 54 + .../EverLtTbigintBigintLogicalFunction.hpp | 54 + .../EverLtTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/EverLtTextTtextLogicalFunction.hpp | 54 + .../Meos/EverLtTfloatFloatLogicalFunction.hpp | 54 + .../Meos/EverLtTintIntLogicalFunction.hpp | 54 + .../Meos/EverLtTtextTextLogicalFunction.hpp | 54 + .../EverNeBigintTbigintLogicalFunction.hpp | 54 + .../Meos/EverNeBoolTboolLogicalFunction.hpp | 54 + .../Meos/EverNeFloatTfloatLogicalFunction.hpp | 54 + .../EverNeGeoTrgeometryLogicalFunction.hpp | 48 + .../Meos/EverNeIntTintLogicalFunction.hpp | 54 + .../EverNeNpointTnpointLogicalFunction.hpp | 56 + .../Meos/EverNePoseTposeLogicalFunction.hpp | 58 + .../EverNeTbigintBigintLogicalFunction.hpp | 54 + .../Meos/EverNeTboolBoolLogicalFunction.hpp | 54 + .../EverNeTcbufferCbufferLogicalFunction.hpp | 56 + .../EverNeTcbufferTcbufferLogicalFunction.hpp | 59 + .../EverNeTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/EverNeTextTtextLogicalFunction.hpp | 54 + .../Meos/EverNeTfloatFloatLogicalFunction.hpp | 54 + .../Meos/EverNeTgeoGeoLogicalFunction.hpp | 55 + .../Meos/EverNeTgeoTgeoLogicalFunction.hpp | 57 + .../EverNeTh3indexH3indexLogicalFunction.hpp | 54 + .../Meos/EverNeTintIntLogicalFunction.hpp | 54 + .../Meos/EverNeTjsonbJsonbLogicalFunction.hpp | 54 + .../EverNeTjsonbTjsonbLogicalFunction.hpp | 55 + .../EverNeTnpointNpointLogicalFunction.hpp | 56 + .../EverNeTnpointTnpointLogicalFunction.hpp | 57 + .../Meos/EverNeTposePoseLogicalFunction.hpp | 58 + .../Meos/EverNeTposeTposeLogicalFunction.hpp | 59 + .../EverNeTquadbinQuadbinLogicalFunction.hpp | 54 + .../EverNeTrgeometryGeoLogicalFunction.hpp | 48 + ...rNeTrgeometryTrgeometryLogicalFunction.hpp | 48 + .../Meos/EverNeTtextTextLogicalFunction.hpp | 54 + .../Meos/FloatspanLowerIncLogicalFunction.hpp | 52 + .../Meos/FloatspanLowerLogicalFunction.hpp | 52 + .../Meos/FloatspanUpperIncLogicalFunction.hpp | 52 + .../Meos/FloatspanUpperLogicalFunction.hpp | 52 + .../Meos/FloatspanWidthLogicalFunction.hpp | 52 + .../Meos/FrontStboxStboxLogicalFunction.hpp | 53 + .../FrontStboxTspatialLogicalFunction.hpp | 55 + .../FrontTspatialStboxLogicalFunction.hpp | 55 + .../FrontTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/GeoAsEwktLogicalFunction.hpp | 53 + .../Meos/GeoAsGeojsonLogicalFunction.hpp | 54 + .../Meos/GeoEqualsLogicalFunction.hpp | 53 + .../Functions/Meos/GeoGeoNLogicalFunction.hpp | 53 + .../Meos/GeoIsUnitaryLogicalFunction.hpp | 52 + .../Meos/GeoNumGeosLogicalFunction.hpp | 52 + .../Meos/GeoNumPointsLogicalFunction.hpp | 52 + .../Meos/GeoPointsLogicalFunction.hpp | 52 + .../Meos/GeoReverseLogicalFunction.hpp | 52 + .../Meos/GeoRoundLogicalFunction.hpp | 53 + .../Functions/Meos/GeoSameLogicalFunction.hpp | 53 + .../Meos/GeoSetSridLogicalFunction.hpp | 53 + .../Functions/Meos/GeoSridLogicalFunction.hpp | 52 + .../Meos/GeoTransformLogicalFunction.hpp | 53 + .../Meos/GeogAreaLogicalFunction.hpp | 52 + .../Meos/GeogCentroidLogicalFunction.hpp | 53 + .../Meos/GeogDistanceLogicalFunction.hpp | 53 + .../Meos/GeogDwithinLogicalFunction.hpp | 54 + .../Meos/GeogIntersectsLogicalFunction.hpp | 53 + .../Meos/GeogLengthLogicalFunction.hpp | 52 + .../Meos/GeogPerimeterLogicalFunction.hpp | 52 + .../Meos/GeogPointMake2dLogicalFunction.hpp | 54 + .../Meos/GeogPointMake3dzLogicalFunction.hpp | 55 + .../Meos/GeogToGeomLogicalFunction.hpp | 52 + .../Meos/GeomAzimuthLogicalFunction.hpp | 52 + .../Meos/GeomBoundaryLogicalFunction.hpp | 52 + .../Meos/GeomCentroidLogicalFunction.hpp | 52 + .../Meos/GeomContainsLogicalFunction.hpp | 53 + .../Meos/GeomConvexHullLogicalFunction.hpp | 52 + .../Meos/GeomCoversLogicalFunction.hpp | 53 + .../Meos/GeomDifference2dLogicalFunction.hpp | 53 + .../Meos/GeomDisjoint2dLogicalFunction.hpp | 53 + .../Meos/GeomDistance2dLogicalFunction.hpp | 53 + .../Meos/GeomDistance3dLogicalFunction.hpp | 53 + .../Meos/GeomDwithin2dLogicalFunction.hpp | 54 + .../Meos/GeomDwithin3dLogicalFunction.hpp | 54 + .../Meos/GeomDwithinLogicalFunction.hpp | 54 + .../GeomIntersection2dCollLogicalFunction.hpp | 53 + .../GeomIntersection2dLogicalFunction.hpp | 53 + .../Meos/GeomIntersects2dLogicalFunction.hpp | 53 + .../Meos/GeomIntersects3dLogicalFunction.hpp | 53 + .../Meos/GeomIntersectsLogicalFunction.hpp | 53 + .../Meos/GeomIsEmptyLogicalFunction.hpp | 52 + .../Meos/GeomLengthLogicalFunction.hpp | 52 + .../Meos/GeomPerimeterLogicalFunction.hpp | 52 + .../Meos/GeomPointMake2dLogicalFunction.hpp | 54 + .../Meos/GeomPointMake3dzLogicalFunction.hpp | 55 + .../GeomShortestline2dLogicalFunction.hpp | 53 + .../GeomShortestline3dLogicalFunction.hpp | 53 + .../Meos/GeomToGeogLogicalFunction.hpp | 52 + .../Meos/GeomTouchesLogicalFunction.hpp | 53 + .../Meos/GeomUnaryUnionLogicalFunction.hpp | 52 + .../Meos/H3indexCmpLogicalFunction.hpp | 53 + .../Meos/H3indexEqLogicalFunction.hpp | 53 + .../Meos/H3indexGeLogicalFunction.hpp | 53 + .../Meos/H3indexGtLogicalFunction.hpp | 53 + .../Meos/H3indexLeLogicalFunction.hpp | 53 + .../Meos/H3indexLtLogicalFunction.hpp | 53 + .../Meos/H3indexNeLogicalFunction.hpp | 53 + .../Meos/H3indexOutLogicalFunction.hpp | 52 + .../Meos/IntspanLowerIncLogicalFunction.hpp | 52 + .../Meos/IntspanLowerLogicalFunction.hpp | 52 + .../Meos/IntspanUpperIncLogicalFunction.hpp | 52 + .../Meos/IntspanUpperLogicalFunction.hpp | 52 + .../Meos/IntspanWidthLogicalFunction.hpp | 52 + .../JsonbArrayElementTextLogicalFunction.hpp | 53 + .../Meos/JsonbArrayLengthLogicalFunction.hpp | 52 + .../Meos/JsonbCmpLogicalFunction.hpp | 53 + .../Meos/JsonbContainedLogicalFunction.hpp | 53 + .../Meos/JsonbContainsLogicalFunction.hpp | 53 + .../Functions/Meos/JsonbEqLogicalFunction.hpp | 53 + .../Meos/JsonbExistsLogicalFunction.hpp | 53 + .../Functions/Meos/JsonbGeLogicalFunction.hpp | 53 + .../Functions/Meos/JsonbGtLogicalFunction.hpp | 53 + .../Functions/Meos/JsonbLeLogicalFunction.hpp | 53 + .../Functions/Meos/JsonbLtLogicalFunction.hpp | 53 + .../Functions/Meos/JsonbNeLogicalFunction.hpp | 53 + .../JsonbObjectFieldTextLogicalFunction.hpp | 53 + .../Meos/JsonbPrettyLogicalFunction.hpp | 52 + .../Meos/JsonbToCstringLogicalFunction.hpp | 52 + .../Meos/LeftStboxStboxLogicalFunction.hpp | 53 + .../Meos/LeftStboxTspatialLogicalFunction.hpp | 55 + .../Meos/LeftTboxTnumberLogicalFunction.hpp | 54 + .../Meos/LeftTnumberTboxLogicalFunction.hpp | 54 + .../LeftTnumberTnumberLogicalFunction.hpp | 53 + .../Meos/LeftTspatialStboxLogicalFunction.hpp | 55 + .../LeftTspatialTspatialLogicalFunction.hpp | 57 + .../LineInterpolatePointLogicalFunction.hpp | 53 + .../Meos/LineLocatePointLogicalFunction.hpp | 53 + .../Meos/LineNumpointsLogicalFunction.hpp | 52 + .../Meos/LinePointNLogicalFunction.hpp | 53 + .../Meos/LineSubstringLogicalFunction.hpp | 54 + ...istanceTcbufferTcbufferLogicalFunction.hpp | 60 + .../Meos/MulBigintTbigintLogicalFunction.hpp | 54 + .../Meos/MulFloatTfloatLogicalFunction.hpp | 54 + .../Meos/MulIntTintLogicalFunction.hpp | 54 + .../Meos/MulTbigintBigintLogicalFunction.hpp | 54 + .../Meos/MulTfloatFloatLogicalFunction.hpp | 54 + .../Meos/MulTintIntLogicalFunction.hpp | 54 + .../Meos/MulTnumberTnumberLogicalFunction.hpp | 53 + .../MultTnumberTnumberLogicalFunction.hpp | 53 + .../Meos/NadStboxStboxLogicalFunction.hpp | 53 + .../Meos/NadTcbufferGeoLogicalFunction.hpp | 56 + .../Meos/NadTcbufferStboxLogicalFunction.hpp | 56 + .../NadTcbufferTcbufferLogicalFunction.hpp | 59 + .../Meos/NadTfloatTboxLogicalFunction.hpp | 54 + .../Meos/NadTgeoGeoLogicalFunction.hpp | 55 + .../Meos/NadTgeoStboxLogicalFunction.hpp | 55 + .../Meos/NadTgeoTgeoLogicalFunction.hpp | 57 + .../Meos/NadTintTboxLogicalFunction.hpp | 54 + .../Meos/NadTnpointGeoLogicalFunction.hpp | 55 + .../Meos/NadTnpointNpointLogicalFunction.hpp | 56 + .../Meos/NadTnpointStboxLogicalFunction.hpp | 55 + .../Meos/NadTnpointTnpointLogicalFunction.hpp | 57 + .../Meos/NadTposeGeoLogicalFunction.hpp | 56 + .../Meos/NadTposePoseLogicalFunction.hpp | 58 + .../Meos/NadTposeStboxLogicalFunction.hpp | 56 + .../Meos/NadTposeTposeLogicalFunction.hpp | 59 + .../Meos/NadTrgeometryGeoLogicalFunction.hpp | 48 + ...NadTrgeometryTrgeometryLogicalFunction.hpp | 48 + .../OveraboveStboxStboxLogicalFunction.hpp | 53 + .../OveraboveStboxTspatialLogicalFunction.hpp | 55 + .../OveraboveTspatialStboxLogicalFunction.hpp | 55 + ...eraboveTspatialTspatialLogicalFunction.hpp | 57 + .../OverafterStboxStboxLogicalFunction.hpp | 53 + .../OverafterStboxTspatialLogicalFunction.hpp | 55 + .../OverafterTboxTnumberLogicalFunction.hpp | 54 + ...erafterTemporalTemporalLogicalFunction.hpp | 57 + .../OverafterTnumberTboxLogicalFunction.hpp | 54 + ...OverafterTnumberTnumberLogicalFunction.hpp | 53 + .../OverafterTspatialStboxLogicalFunction.hpp | 55 + ...erafterTspatialTspatialLogicalFunction.hpp | 57 + .../OverbackStboxStboxLogicalFunction.hpp | 53 + .../OverbackStboxTspatialLogicalFunction.hpp | 55 + .../OverbackTspatialStboxLogicalFunction.hpp | 55 + ...verbackTspatialTspatialLogicalFunction.hpp | 57 + .../OverbeforeStboxStboxLogicalFunction.hpp | 53 + ...OverbeforeStboxTspatialLogicalFunction.hpp | 55 + .../OverbeforeTboxTnumberLogicalFunction.hpp | 54 + ...rbeforeTemporalTemporalLogicalFunction.hpp | 57 + .../OverbeforeTnumberTboxLogicalFunction.hpp | 54 + ...verbeforeTnumberTnumberLogicalFunction.hpp | 53 + ...OverbeforeTspatialStboxLogicalFunction.hpp | 55 + ...rbeforeTspatialTspatialLogicalFunction.hpp | 57 + .../OverbelowStboxStboxLogicalFunction.hpp | 53 + .../OverbelowStboxTspatialLogicalFunction.hpp | 55 + .../OverbelowTspatialStboxLogicalFunction.hpp | 55 + ...erbelowTspatialTspatialLogicalFunction.hpp | 57 + .../OverfrontStboxStboxLogicalFunction.hpp | 53 + .../OverfrontStboxTspatialLogicalFunction.hpp | 55 + .../OverfrontTspatialStboxLogicalFunction.hpp | 55 + ...erfrontTspatialTspatialLogicalFunction.hpp | 57 + .../OverlapsStboxStboxLogicalFunction.hpp | 53 + .../OverlapsStboxTspatialLogicalFunction.hpp | 55 + .../OverlapsTboxTnumberLogicalFunction.hpp | 54 + ...verlapsTemporalTemporalLogicalFunction.hpp | 57 + .../OverlapsTnumberTboxLogicalFunction.hpp | 54 + .../OverlapsTnumberTnumberLogicalFunction.hpp | 53 + .../OverlapsTspatialStboxLogicalFunction.hpp | 55 + ...verlapsTspatialTspatialLogicalFunction.hpp | 57 + .../OverleftStboxStboxLogicalFunction.hpp | 53 + .../OverleftStboxTspatialLogicalFunction.hpp | 55 + .../OverleftTboxTnumberLogicalFunction.hpp | 54 + .../OverleftTnumberTboxLogicalFunction.hpp | 54 + .../OverleftTnumberTnumberLogicalFunction.hpp | 53 + .../OverleftTspatialStboxLogicalFunction.hpp | 55 + ...verleftTspatialTspatialLogicalFunction.hpp | 57 + .../OverrightStboxStboxLogicalFunction.hpp | 53 + .../OverrightStboxTspatialLogicalFunction.hpp | 55 + .../OverrightTboxTnumberLogicalFunction.hpp | 54 + .../OverrightTnumberTboxLogicalFunction.hpp | 54 + ...OverrightTnumberTnumberLogicalFunction.hpp | 53 + .../OverrightTspatialStboxLogicalFunction.hpp | 55 + ...errightTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/QuadbinCellAreaLogicalFunction.hpp | 52 + .../QuadbinCellToParentLogicalFunction.hpp | 53 + .../QuadbinCellToQuadkeyLogicalFunction.hpp | 52 + .../Meos/QuadbinCmpLogicalFunction.hpp | 53 + .../Meos/QuadbinEqLogicalFunction.hpp | 53 + .../Meos/QuadbinGeLogicalFunction.hpp | 53 + .../QuadbinGetResolutionLogicalFunction.hpp | 52 + .../Meos/QuadbinGtLogicalFunction.hpp | 53 + .../QuadbinIsValidCellLogicalFunction.hpp | 52 + .../Meos/QuadbinLeLogicalFunction.hpp | 53 + .../Meos/QuadbinLtLogicalFunction.hpp | 53 + .../Meos/QuadbinNeLogicalFunction.hpp | 53 + .../QuadbinPointToCellLogicalFunction.hpp | 54 + .../Meos/QuadbinTileToCellLogicalFunction.hpp | 54 + .../Meos/RightStboxStboxLogicalFunction.hpp | 53 + .../RightStboxTspatialLogicalFunction.hpp | 55 + .../Meos/RightTboxTnumberLogicalFunction.hpp | 54 + .../Meos/RightTnumberTboxLogicalFunction.hpp | 54 + .../RightTnumberTnumberLogicalFunction.hpp | 53 + .../RightTspatialStboxLogicalFunction.hpp | 55 + .../RightTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/SameStboxStboxLogicalFunction.hpp | 53 + .../Meos/SameStboxTspatialLogicalFunction.hpp | 55 + .../Meos/SameTboxTnumberLogicalFunction.hpp | 54 + .../SameTemporalTemporalLogicalFunction.hpp | 57 + .../Meos/SameTnumberTboxLogicalFunction.hpp | 54 + .../SameTnumberTnumberLogicalFunction.hpp | 53 + .../Meos/SameTspatialStboxLogicalFunction.hpp | 55 + .../SameTspatialTspatialLogicalFunction.hpp | 57 + .../Meos/StboxCmpLogicalFunction.hpp | 53 + .../Functions/Meos/StboxEqLogicalFunction.hpp | 53 + .../Functions/Meos/StboxGeLogicalFunction.hpp | 53 + .../Functions/Meos/StboxGtLogicalFunction.hpp | 53 + .../Functions/Meos/StboxLeLogicalFunction.hpp | 53 + .../Functions/Meos/StboxLtLogicalFunction.hpp | 53 + .../Functions/Meos/StboxNeLogicalFunction.hpp | 53 + .../Meos/SubBigintTbigintLogicalFunction.hpp | 54 + .../Meos/SubFloatTfloatLogicalFunction.hpp | 54 + .../Meos/SubIntTintLogicalFunction.hpp | 54 + .../Meos/SubTbigintBigintLogicalFunction.hpp | 54 + .../Meos/SubTfloatFloatLogicalFunction.hpp | 54 + .../Meos/SubTintIntLogicalFunction.hpp | 54 + .../Meos/SubTnumberTnumberLogicalFunction.hpp | 53 + .../Meos/TEqTextTtextLogicalFunction.hpp | 54 + .../Meos/TEqTtextTextLogicalFunction.hpp | 54 + .../Meos/TGeTextTtextLogicalFunction.hpp | 54 + .../Meos/TGeTtextTextLogicalFunction.hpp | 54 + .../Meos/TGtTextTtextLogicalFunction.hpp | 54 + .../Meos/TGtTtextTextLogicalFunction.hpp | 54 + .../Meos/TLeTextTtextLogicalFunction.hpp | 54 + .../Meos/TLeTtextTextLogicalFunction.hpp | 54 + .../Meos/TLtTextTtextLogicalFunction.hpp | 54 + .../Meos/TLtTtextTextLogicalFunction.hpp | 54 + .../Meos/TNeTextTtextLogicalFunction.hpp | 54 + .../Meos/TNeTtextTextLogicalFunction.hpp | 54 + .../Meos/TandBoolTboolLogicalFunction.hpp | 54 + .../Meos/TandTboolBoolLogicalFunction.hpp | 54 + .../Meos/TandTboolTboolLogicalFunction.hpp | 53 + .../Meos/TbigintScaleValueLogicalFunction.hpp | 54 + .../TbigintShiftScaleValueLogicalFunction.hpp | 55 + .../Meos/TbigintShiftValueLogicalFunction.hpp | 54 + .../Meos/TbigintToTfloatLogicalFunction.hpp | 53 + .../Meos/TbigintToTintLogicalFunction.hpp | 53 + .../Meos/TboolEndValueLogicalFunction.hpp | 53 + .../Meos/TboolStartValueLogicalFunction.hpp | 53 + .../Meos/TboolToTintLogicalFunction.hpp | 53 + .../Meos/TcbufferToTfloatLogicalFunction.hpp | 55 + ...ontainsTcbufferTcbufferLogicalFunction.hpp | 53 + .../Meos/TcontainsTgeoTgeoLogicalFunction.hpp | 53 + ...TcoversTcbufferTcbufferLogicalFunction.hpp | 53 + .../Meos/TcoversTgeoTgeoLogicalFunction.hpp | 53 + ...istanceTcbufferTcbufferLogicalFunction.hpp | 53 + .../TdistanceTfloatFloatLogicalFunction.hpp | 54 + .../Meos/TdistanceTgeoTgeoLogicalFunction.hpp | 53 + .../Meos/TdistanceTintIntLogicalFunction.hpp | 54 + ...TdistanceTnpointTnpointLogicalFunction.hpp | 53 + ...TdistanceTnumberTnumberLogicalFunction.hpp | 53 + .../TdistanceTposeTposeLogicalFunction.hpp | 53 + ...mporalAContainsGeometryLogicalFunction.hpp | 55 + ...ContainsTCbufferCbufferLogicalFunction.hpp | 56 + ...mporalAContainsTCbufferLogicalFunction.hpp | 56 + ...poralAContainsTGeometryLogicalFunction.hpp | 57 + ...ContainsTNpointGeometryLogicalFunction.hpp | 55 + ...AContainsTNpointTNpointLogicalFunction.hpp | 57 + ...lAContainsTPoseGeometryLogicalFunction.hpp | 56 + ...oralAContainsTPoseTPoseLogicalFunction.hpp | 59 + ...lACoversTCbufferCbufferLogicalFunction.hpp | 56 + ...TemporalACoversTCbufferLogicalFunction.hpp | 56 + ...emporalADWithinGeometryLogicalFunction.hpp | 56 + ...ADWithinTCbufferCbufferLogicalFunction.hpp | 57 + ...DWithinTCbufferGeometryLogicalFunction.hpp | 57 + ...DWithinTCbufferTCbufferLogicalFunction.hpp | 60 + ...mporalADWithinTGeometryLogicalFunction.hpp | 58 + ...ADWithinTNpointGeometryLogicalFunction.hpp | 56 + ...lADWithinTNpointTNpointLogicalFunction.hpp | 58 + ...alADWithinTPoseGeometryLogicalFunction.hpp | 57 + ...poralADWithinTPoseTPoseLogicalFunction.hpp | 60 + ...mporalADisjointGeometryLogicalFunction.hpp | 55 + ...DisjointTCbufferCbufferLogicalFunction.hpp | 56 + ...mporalADisjointTCbufferLogicalFunction.hpp | 56 + ...isjointTCbufferTCbufferLogicalFunction.hpp | 59 + ...poralADisjointTGeometryLogicalFunction.hpp | 57 + ...DisjointTNpointGeometryLogicalFunction.hpp | 55 + ...ADisjointTNpointTNpointLogicalFunction.hpp | 57 + ...lADisjointTPoseGeometryLogicalFunction.hpp | 56 + ...oralADisjointTPoseTPoseLogicalFunction.hpp | 59 + ...oralAIntersectsGeometryLogicalFunction.hpp | 51 +- ...tersectsTCbufferCbufferLogicalFunction.hpp | 56 + ...oralAIntersectsTCbufferLogicalFunction.hpp | 56 + ...ersectsTCbufferTCbufferLogicalFunction.hpp | 59 + ...ralAIntersectsTGeometryLogicalFunction.hpp | 57 + ...tersectsTNpointGeometryLogicalFunction.hpp | 55 + ...ntersectsTNpointTNpointLogicalFunction.hpp | 57 + ...IntersectsTPoseGeometryLogicalFunction.hpp | 56 + ...alAIntersectsTPoseTPoseLogicalFunction.hpp | 59 + ...emporalATouchesGeometryLogicalFunction.hpp | 55 + ...ATouchesTCbufferCbufferLogicalFunction.hpp | 56 + ...emporalATouchesTCbufferLogicalFunction.hpp | 56 + ...TouchesTCbufferTCbufferLogicalFunction.hpp | 59 + ...mporalATouchesTGeometryLogicalFunction.hpp | 57 + ...ATouchesTNpointGeometryLogicalFunction.hpp | 55 + ...lATouchesTNpointTNpointLogicalFunction.hpp | 57 + ...alATouchesTPoseGeometryLogicalFunction.hpp | 56 + ...poralATouchesTPoseTPoseLogicalFunction.hpp | 59 + .../TemporalAtGeometryLogicalFunction.hpp | 55 + .../Meos/TemporalAtStBoxLogicalFunction.hpp | 34 +- .../Meos/TemporalCmpLogicalFunction.hpp | 57 + ...oralDyntimewarpDistanceLogicalFunction.hpp | 57 + ...mporalEContainsGeometryLogicalFunction.hpp | 62 +- ...ContainsTCbufferCbufferLogicalFunction.hpp | 56 + ...mporalEContainsTCbufferLogicalFunction.hpp | 56 + ...poralEContainsTGeometryLogicalFunction.hpp | 57 + ...ContainsTNpointGeometryLogicalFunction.hpp | 55 + ...EContainsTNpointTNpointLogicalFunction.hpp | 57 + ...lEContainsTPoseGeometryLogicalFunction.hpp | 56 + ...oralEContainsTPoseTPoseLogicalFunction.hpp | 59 + ...TemporalECoversGeometryLogicalFunction.hpp | 55 + ...lECoversTCbufferCbufferLogicalFunction.hpp | 56 + ...TemporalECoversTCbufferLogicalFunction.hpp | 56 + ...ECoversTCbufferTCbufferLogicalFunction.hpp | 59 + ...emporalECoversTGeometryLogicalFunction.hpp | 57 + ...lECoversTNpointGeometryLogicalFunction.hpp | 55 + ...alECoversTNpointTNpointLogicalFunction.hpp | 57 + ...ralECoversTPoseGeometryLogicalFunction.hpp | 56 + ...mporalECoversTPoseTPoseLogicalFunction.hpp | 59 + ...emporalEDWithinGeometryLogicalFunction.hpp | 29 +- ...EDWithinTCbufferCbufferLogicalFunction.hpp | 57 + ...DWithinTCbufferGeometryLogicalFunction.hpp | 57 + ...DWithinTCbufferTCbufferLogicalFunction.hpp | 60 + ...mporalEDWithinTGeometryLogicalFunction.hpp | 58 + ...EDWithinTNpointGeometryLogicalFunction.hpp | 56 + ...lEDWithinTNpointTNpointLogicalFunction.hpp | 58 + ...alEDWithinTPoseGeometryLogicalFunction.hpp | 57 + ...poralEDWithinTPoseTPoseLogicalFunction.hpp | 60 + ...mporalEDisjointGeometryLogicalFunction.hpp | 55 + ...DisjointTCbufferCbufferLogicalFunction.hpp | 56 + ...mporalEDisjointTCbufferLogicalFunction.hpp | 56 + ...poralEDisjointTGeometryLogicalFunction.hpp | 57 + ...DisjointTNpointGeometryLogicalFunction.hpp | 55 + ...EDisjointTNpointTNpointLogicalFunction.hpp | 57 + ...lEDisjointTPoseGeometryLogicalFunction.hpp | 56 + ...oralEDisjointTPoseTPoseLogicalFunction.hpp | 59 + ...oralEIntersectsGeometryLogicalFunction.hpp | 55 + ...tersectsTCbufferCbufferLogicalFunction.hpp | 56 + ...oralEIntersectsTCbufferLogicalFunction.hpp | 56 + ...ersectsTCbufferTCbufferLogicalFunction.hpp | 59 + ...ralEIntersectsTGeometryLogicalFunction.hpp | 57 + ...tersectsTNpointGeometryLogicalFunction.hpp | 55 + ...ntersectsTNpointTNpointLogicalFunction.hpp | 57 + ...IntersectsTPoseGeometryLogicalFunction.hpp | 56 + ...alEIntersectsTPoseTPoseLogicalFunction.hpp | 59 + ...emporalETouchesGeometryLogicalFunction.hpp | 55 + ...ETouchesTCbufferCbufferLogicalFunction.hpp | 56 + ...emporalETouchesTCbufferLogicalFunction.hpp | 56 + ...TouchesTCbufferTCbufferLogicalFunction.hpp | 59 + ...mporalETouchesTGeometryLogicalFunction.hpp | 57 + ...ETouchesTNpointGeometryLogicalFunction.hpp | 55 + ...lETouchesTNpointTNpointLogicalFunction.hpp | 57 + ...alETouchesTPoseGeometryLogicalFunction.hpp | 56 + ...poralETouchesTPoseTPoseLogicalFunction.hpp | 59 + .../Meos/TemporalEqLogicalFunction.hpp | 57 + ...TemporalFrechetDistanceLogicalFunction.hpp | 57 + .../Meos/TemporalGeLogicalFunction.hpp | 57 + .../Meos/TemporalGtLogicalFunction.hpp | 57 + ...mporalHausdorffDistanceLogicalFunction.hpp | 57 + ...poralIntersectsGeometryLogicalFunction.hpp | 50 +- .../Meos/TemporalLeLogicalFunction.hpp | 57 + .../Meos/TemporalLtLogicalFunction.hpp | 57 + .../TemporalMinusGeometryLogicalFunction.hpp | 55 + .../TemporalNADFloatScalarLogicalFunction.hpp | 54 + .../TemporalNADGeometryLogicalFunction.hpp | 57 + .../TemporalNADIntScalarLogicalFunction.hpp | 54 + ...poralNADTCbufferCbufferLogicalFunction.hpp | 56 + .../TemporalNADTCbufferLogicalFunction.hpp | 56 + ...oralNADTCbufferTCbufferLogicalFunction.hpp | 59 + .../Meos/TemporalNADTFloatLogicalFunction.hpp | 55 + .../TemporalNADTGeometryLogicalFunction.hpp | 57 + .../Meos/TemporalNADTIntLogicalFunction.hpp | 55 + ...poralNADTNpointGeometryLogicalFunction.hpp | 55 + ...mporalNADTNpointTNpointLogicalFunction.hpp | 57 + ...emporalNADTPoseGeometryLogicalFunction.hpp | 56 + .../TemporalNADTPoseTPoseLogicalFunction.hpp | 59 + .../Meos/TemporalNeLogicalFunction.hpp | 57 + .../Meos/TemporalRoundLogicalFunction.hpp | 54 + .../Meos/TeqBoolTboolLogicalFunction.hpp | 54 + .../Meos/TeqTboolBoolLogicalFunction.hpp | 54 + .../Meos/TextInitcapLogicalFunction.hpp | 52 + .../Meos/TextLowerLogicalFunction.hpp | 52 + .../Meos/TextUpperLogicalFunction.hpp | 52 + .../Meos/TextcatTextTtextLogicalFunction.hpp | 54 + .../Meos/TextcatTtextTextLogicalFunction.hpp | 54 + .../Meos/TextcatTtextTtextLogicalFunction.hpp | 55 + .../Meos/TfloatCeilLogicalFunction.hpp | 53 + .../Meos/TfloatExpLogicalFunction.hpp | 53 + .../Meos/TfloatFloorLogicalFunction.hpp | 53 + .../Meos/TfloatLnLogicalFunction.hpp | 53 + .../Meos/TfloatLog10LogicalFunction.hpp | 53 + .../Meos/TfloatRadiansLogicalFunction.hpp | 53 + .../Meos/TfloatScaleValueLogicalFunction.hpp | 54 + .../TfloatShiftScaleValueLogicalFunction.hpp | 55 + .../Meos/TfloatShiftValueLogicalFunction.hpp | 54 + .../Meos/TfloatToTbigintLogicalFunction.hpp | 53 + .../Meos/TfloatToTintLogicalFunction.hpp | 53 + ...h3indexAreNeighborCellsLogicalFunction.hpp | 55 + ...3indexCellToCenterChildLogicalFunction.hpp | 54 + ...exCellToCenterChildNextLogicalFunction.hpp | 54 + .../Th3indexCellToChildPosLogicalFunction.hpp | 54 + .../Th3indexCellToParentLogicalFunction.hpp | 54 + ...h3indexCellToParentNextLogicalFunction.hpp | 54 + ...3indexGetBaseCellNumberLogicalFunction.hpp | 53 + .../Th3indexGetResolutionLogicalFunction.hpp | 53 + .../Th3indexGridDistanceLogicalFunction.hpp | 55 + .../Th3indexIsPentagonLogicalFunction.hpp | 53 + .../Th3indexIsValidCellLogicalFunction.hpp | 53 + .../Meos/TintScaleValueLogicalFunction.hpp | 54 + .../TintShiftScaleValueLogicalFunction.hpp | 55 + .../Meos/TintShiftValueLogicalFunction.hpp | 54 + .../Meos/TintToTbigintLogicalFunction.hpp | 53 + .../Meos/TintToTfloatLogicalFunction.hpp | 53 + .../Meos/TneBoolTboolLogicalFunction.hpp | 54 + .../Meos/TneTboolBoolLogicalFunction.hpp | 54 + .../Meos/TnotTboolLogicalFunction.hpp | 53 + .../Meos/TnpointLengthLogicalFunction.hpp | 54 + .../Meos/TorBoolTboolLogicalFunction.hpp | 54 + .../Meos/TorTboolBoolLogicalFunction.hpp | 54 + .../Meos/TorTboolTboolLogicalFunction.hpp | 53 + .../Meos/TpointLengthWkbLogicalFunction.hpp | 52 + .../Meos/TtextInitcapLogicalFunction.hpp | 53 + .../Meos/TtextLowerLogicalFunction.hpp | 53 + .../Meos/TtextUpperLogicalFunction.hpp | 53 + .../Meos/AboveStboxStboxLogicalFunction.cpp | 125 + .../AboveStboxTspatialLogicalFunction.cpp | 131 + .../AboveTspatialStboxLogicalFunction.cpp | 131 + .../AboveTspatialTspatialLogicalFunction.cpp | 137 + .../AcontainsGeoTrgeometryLogicalFunction.cpp | 87 + .../AcontainsTcbufferGeoLogicalFunction.cpp | 134 + ...ontainsTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/AcontainsTgeoGeoLogicalFunction.cpp | 131 + .../Meos/AcontainsTgeoTgeoLogicalFunction.cpp | 137 + .../AcoversGeoTrgeometryLogicalFunction.cpp | 87 + .../AcoversTcbufferGeoLogicalFunction.cpp | 134 + ...AcoversTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/AcoversTgeoGeoLogicalFunction.cpp | 131 + .../Meos/AcoversTgeoTgeoLogicalFunction.cpp | 137 + .../AcoversTrgeometryGeoLogicalFunction.cpp | 87 + .../Meos/AddBigintTbigintLogicalFunction.cpp | 128 + .../Meos/AddFloatTfloatLogicalFunction.cpp | 128 + .../Meos/AddIntTintLogicalFunction.cpp | 128 + .../Meos/AddTbigintBigintLogicalFunction.cpp | 128 + .../Meos/AddTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AddTintIntLogicalFunction.cpp | 128 + .../Meos/AddTnumberTnumberLogicalFunction.cpp | 125 + .../AdisjointTcbufferGeoLogicalFunction.cpp | 134 + ...isjointTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/AdisjointTgeoGeoLogicalFunction.cpp | 131 + .../Meos/AdisjointTgeoTgeoLogicalFunction.cpp | 137 + .../AdisjointTrgeometryGeoLogicalFunction.cpp | 87 + ...intTrgeometryTrgeometryLogicalFunction.cpp | 99 + .../AdjacentStboxStboxLogicalFunction.cpp | 125 + .../AdjacentStboxTspatialLogicalFunction.cpp | 131 + .../AdjacentTboxTnumberLogicalFunction.cpp | 128 + ...djacentTemporalTemporalLogicalFunction.cpp | 137 + .../AdjacentTnumberTboxLogicalFunction.cpp | 128 + .../AdjacentTnumberTnumberLogicalFunction.cpp | 125 + .../AdjacentTspatialStboxLogicalFunction.cpp | 131 + ...djacentTspatialTspatialLogicalFunction.cpp | 137 + ...AdwithinTcbufferCbufferLogicalFunction.cpp | 137 + .../AdwithinTcbufferGeoLogicalFunction.cpp | 137 + ...dwithinTcbufferTcbufferLogicalFunction.cpp | 146 + .../Meos/AdwithinTgeoGeoLogicalFunction.cpp | 134 + .../Meos/AdwithinTgeoTgeoLogicalFunction.cpp | 140 + .../AdwithinTrgeometryGeoLogicalFunction.cpp | 90 + ...hinTrgeometryTrgeometryLogicalFunction.cpp | 102 + .../Meos/AfterStboxStboxLogicalFunction.cpp | 125 + .../AfterStboxTspatialLogicalFunction.cpp | 131 + .../Meos/AfterTboxTnumberLogicalFunction.cpp | 128 + .../AfterTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AfterTnumberTboxLogicalFunction.cpp | 128 + .../AfterTnumberTnumberLogicalFunction.cpp | 125 + .../AfterTspatialStboxLogicalFunction.cpp | 131 + .../AfterTspatialTspatialLogicalFunction.cpp | 137 + .../AintersectsTcbufferGeoLogicalFunction.cpp | 134 + ...ersectsTcbufferTcbufferLogicalFunction.cpp | 143 + .../AintersectsTgeoGeoLogicalFunction.cpp | 131 + .../AintersectsTgeoTgeoLogicalFunction.cpp | 137 + ...intersectsTrgeometryGeoLogicalFunction.cpp | 87 + ...ctsTrgeometryTrgeometryLogicalFunction.cpp | 99 + .../AlwaysEqBigintTbigintLogicalFunction.cpp | 128 + .../Meos/AlwaysEqBoolTboolLogicalFunction.cpp | 128 + .../AlwaysEqFloatTfloatLogicalFunction.cpp | 128 + .../AlwaysEqGeoTrgeometryLogicalFunction.cpp | 111 + .../Meos/AlwaysEqIntTintLogicalFunction.cpp | 128 + .../AlwaysEqNpointTnpointLogicalFunction.cpp | 134 + .../Meos/AlwaysEqPoseTposeLogicalFunction.cpp | 140 + .../AlwaysEqTbigintBigintLogicalFunction.cpp | 128 + .../Meos/AlwaysEqTboolBoolLogicalFunction.cpp | 128 + ...AlwaysEqTcbufferCbufferLogicalFunction.cpp | 134 + ...lwaysEqTcbufferTcbufferLogicalFunction.cpp | 143 + ...lwaysEqTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AlwaysEqTextTtextLogicalFunction.cpp | 128 + .../AlwaysEqTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AlwaysEqTgeoGeoLogicalFunction.cpp | 131 + .../Meos/AlwaysEqTgeoTgeoLogicalFunction.cpp | 137 + ...AlwaysEqTh3indexH3indexLogicalFunction.cpp | 128 + .../Meos/AlwaysEqTintIntLogicalFunction.cpp | 128 + .../AlwaysEqTjsonbJsonbLogicalFunction.cpp | 128 + .../AlwaysEqTjsonbTjsonbLogicalFunction.cpp | 131 + .../AlwaysEqTnpointNpointLogicalFunction.cpp | 134 + .../AlwaysEqTnpointTnpointLogicalFunction.cpp | 137 + .../Meos/AlwaysEqTposePoseLogicalFunction.cpp | 140 + .../AlwaysEqTposeTposeLogicalFunction.cpp | 143 + ...AlwaysEqTquadbinQuadbinLogicalFunction.cpp | 128 + .../AlwaysEqTrgeometryGeoLogicalFunction.cpp | 111 + ...sEqTrgeometryTrgeometryLogicalFunction.cpp | 123 + .../Meos/AlwaysEqTtextTextLogicalFunction.cpp | 128 + .../AlwaysGeBigintTbigintLogicalFunction.cpp | 128 + .../AlwaysGeFloatTfloatLogicalFunction.cpp | 128 + .../Meos/AlwaysGeIntTintLogicalFunction.cpp | 128 + .../AlwaysGeTbigintBigintLogicalFunction.cpp | 128 + ...lwaysGeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AlwaysGeTextTtextLogicalFunction.cpp | 128 + .../AlwaysGeTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AlwaysGeTintIntLogicalFunction.cpp | 128 + .../Meos/AlwaysGeTtextTextLogicalFunction.cpp | 128 + .../AlwaysGtBigintTbigintLogicalFunction.cpp | 128 + .../AlwaysGtFloatTfloatLogicalFunction.cpp | 128 + .../Meos/AlwaysGtIntTintLogicalFunction.cpp | 128 + .../AlwaysGtTbigintBigintLogicalFunction.cpp | 128 + ...lwaysGtTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AlwaysGtTextTtextLogicalFunction.cpp | 128 + .../AlwaysGtTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AlwaysGtTintIntLogicalFunction.cpp | 128 + .../Meos/AlwaysGtTtextTextLogicalFunction.cpp | 128 + .../AlwaysLeBigintTbigintLogicalFunction.cpp | 128 + .../AlwaysLeFloatTfloatLogicalFunction.cpp | 128 + .../Meos/AlwaysLeIntTintLogicalFunction.cpp | 128 + .../AlwaysLeTbigintBigintLogicalFunction.cpp | 128 + ...lwaysLeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AlwaysLeTextTtextLogicalFunction.cpp | 128 + .../AlwaysLeTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AlwaysLeTintIntLogicalFunction.cpp | 128 + .../Meos/AlwaysLeTtextTextLogicalFunction.cpp | 128 + .../AlwaysLtBigintTbigintLogicalFunction.cpp | 128 + .../AlwaysLtFloatTfloatLogicalFunction.cpp | 128 + .../Meos/AlwaysLtIntTintLogicalFunction.cpp | 128 + .../AlwaysLtTbigintBigintLogicalFunction.cpp | 128 + ...lwaysLtTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AlwaysLtTextTtextLogicalFunction.cpp | 128 + .../AlwaysLtTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AlwaysLtTintIntLogicalFunction.cpp | 128 + .../Meos/AlwaysLtTtextTextLogicalFunction.cpp | 128 + .../AlwaysNeBigintTbigintLogicalFunction.cpp | 128 + .../Meos/AlwaysNeBoolTboolLogicalFunction.cpp | 128 + .../AlwaysNeFloatTfloatLogicalFunction.cpp | 128 + .../AlwaysNeGeoTrgeometryLogicalFunction.cpp | 111 + .../Meos/AlwaysNeIntTintLogicalFunction.cpp | 128 + .../AlwaysNeNpointTnpointLogicalFunction.cpp | 134 + .../Meos/AlwaysNePoseTposeLogicalFunction.cpp | 140 + .../AlwaysNeTbigintBigintLogicalFunction.cpp | 128 + .../Meos/AlwaysNeTboolBoolLogicalFunction.cpp | 128 + ...AlwaysNeTcbufferCbufferLogicalFunction.cpp | 134 + ...lwaysNeTcbufferTcbufferLogicalFunction.cpp | 143 + ...lwaysNeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/AlwaysNeTextTtextLogicalFunction.cpp | 128 + .../AlwaysNeTfloatFloatLogicalFunction.cpp | 128 + .../Meos/AlwaysNeTgeoGeoLogicalFunction.cpp | 131 + .../Meos/AlwaysNeTgeoTgeoLogicalFunction.cpp | 137 + ...AlwaysNeTh3indexH3indexLogicalFunction.cpp | 128 + .../Meos/AlwaysNeTintIntLogicalFunction.cpp | 128 + .../AlwaysNeTjsonbJsonbLogicalFunction.cpp | 128 + .../AlwaysNeTjsonbTjsonbLogicalFunction.cpp | 131 + .../AlwaysNeTnpointNpointLogicalFunction.cpp | 134 + .../AlwaysNeTnpointTnpointLogicalFunction.cpp | 137 + .../Meos/AlwaysNeTposePoseLogicalFunction.cpp | 140 + .../AlwaysNeTposeTposeLogicalFunction.cpp | 143 + ...AlwaysNeTquadbinQuadbinLogicalFunction.cpp | 128 + .../AlwaysNeTrgeometryGeoLogicalFunction.cpp | 111 + ...sNeTrgeometryTrgeometryLogicalFunction.cpp | 123 + .../Meos/AlwaysNeTtextTextLogicalFunction.cpp | 128 + .../AtouchesTcbufferGeoLogicalFunction.cpp | 134 + ...touchesTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/AtouchesTgeoGeoLogicalFunction.cpp | 131 + .../Meos/AtouchesTgeoTgeoLogicalFunction.cpp | 137 + .../Meos/AtouchesTpointGeoLogicalFunction.cpp | 131 + .../AtouchesTrgeometryGeoLogicalFunction.cpp | 87 + .../Meos/BackStboxStboxLogicalFunction.cpp | 125 + .../Meos/BackStboxTspatialLogicalFunction.cpp | 131 + .../Meos/BackTspatialStboxLogicalFunction.cpp | 131 + .../BackTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/BeforeStboxStboxLogicalFunction.cpp | 125 + .../BeforeStboxTspatialLogicalFunction.cpp | 131 + .../Meos/BeforeTboxTnumberLogicalFunction.cpp | 128 + .../BeforeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/BeforeTnumberTboxLogicalFunction.cpp | 128 + .../BeforeTnumberTnumberLogicalFunction.cpp | 125 + .../BeforeTspatialStboxLogicalFunction.cpp | 131 + .../BeforeTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/BelowStboxStboxLogicalFunction.cpp | 125 + .../BelowStboxTspatialLogicalFunction.cpp | 131 + .../BelowTspatialStboxLogicalFunction.cpp | 131 + .../BelowTspatialTspatialLogicalFunction.cpp | 137 + .../src/Functions/Meos/CMakeLists.txt | 765 + .../ContainedFloatSpanLogicalFunction.cpp | 125 + .../ContainedFloatspanSpanLogicalFunction.cpp | 125 + .../Meos/ContainedIntSpanLogicalFunction.cpp | 125 + .../Meos/ContainedSpanSpanLogicalFunction.cpp | 125 + .../ContainedStboxStboxLogicalFunction.cpp | 125 + .../ContainedStboxTspatialLogicalFunction.cpp | 131 + .../ContainedTboxTnumberLogicalFunction.cpp | 128 + ...ntainedTemporalTemporalLogicalFunction.cpp | 137 + .../ContainedTnumberTboxLogicalFunction.cpp | 128 + ...ContainedTnumberTnumberLogicalFunction.cpp | 125 + .../ContainedTspatialStboxLogicalFunction.cpp | 131 + ...ntainedTspatialTspatialLogicalFunction.cpp | 137 + .../ContainsFloatspanSpanLogicalFunction.cpp | 125 + .../Meos/ContainsSpanFloatLogicalFunction.cpp | 125 + .../Meos/ContainsSpanIntLogicalFunction.cpp | 125 + .../Meos/ContainsSpanSpanLogicalFunction.cpp | 125 + .../ContainsStboxStboxLogicalFunction.cpp | 125 + .../ContainsStboxTspatialLogicalFunction.cpp | 131 + .../ContainsTboxTnumberLogicalFunction.cpp | 128 + ...ontainsTemporalTemporalLogicalFunction.cpp | 137 + .../ContainsTnumberTboxLogicalFunction.cpp | 128 + .../ContainsTnumberTnumberLogicalFunction.cpp | 125 + .../ContainsTspatialStboxLogicalFunction.cpp | 131 + ...ontainsTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/DivBigintTbigintLogicalFunction.cpp | 128 + .../Meos/DivFloatTfloatLogicalFunction.cpp | 128 + .../Meos/DivIntTintLogicalFunction.cpp | 128 + .../Meos/DivTbigintBigintLogicalFunction.cpp | 128 + .../Meos/DivTfloatFloatLogicalFunction.cpp | 128 + .../Meos/DivTintIntLogicalFunction.cpp | 128 + .../Meos/DivTnumberTnumberLogicalFunction.cpp | 125 + .../EcontainsGeoTrgeometryLogicalFunction.cpp | 87 + .../EcontainsTcbufferGeoLogicalFunction.cpp | 134 + ...ontainsTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/EcontainsTgeoGeoLogicalFunction.cpp | 131 + .../Meos/EcontainsTgeoTgeoLogicalFunction.cpp | 137 + .../EcoversGeoTrgeometryLogicalFunction.cpp | 87 + .../EcoversTcbufferGeoLogicalFunction.cpp | 134 + ...EcoversTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/EcoversTgeoGeoLogicalFunction.cpp | 131 + .../Meos/EcoversTgeoTgeoLogicalFunction.cpp | 137 + .../EcoversTrgeometryGeoLogicalFunction.cpp | 87 + .../EdisjointTcbufferGeoLogicalFunction.cpp | 134 + ...isjointTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/EdisjointTgeoGeoLogicalFunction.cpp | 131 + .../Meos/EdisjointTgeoTgeoLogicalFunction.cpp | 137 + .../EdisjointTrgeometryGeoLogicalFunction.cpp | 87 + ...intTrgeometryTrgeometryLogicalFunction.cpp | 99 + ...EdwithinTcbufferCbufferLogicalFunction.cpp | 137 + .../EdwithinTcbufferGeoLogicalFunction.cpp | 137 + ...dwithinTcbufferTcbufferLogicalFunction.cpp | 146 + .../Meos/EdwithinTgeoGeoLogicalFunction.cpp | 134 + .../Meos/EdwithinTgeoTgeoLogicalFunction.cpp | 140 + .../EdwithinTrgeometryGeoLogicalFunction.cpp | 90 + ...hinTrgeometryTrgeometryLogicalFunction.cpp | 102 + .../EintersectsTcbufferGeoLogicalFunction.cpp | 134 + ...ersectsTcbufferTcbufferLogicalFunction.cpp | 143 + .../EintersectsTgeoGeoLogicalFunction.cpp | 131 + .../EintersectsTgeoTgeoLogicalFunction.cpp | 137 + ...intersectsTrgeometryGeoLogicalFunction.cpp | 87 + ...ctsTrgeometryTrgeometryLogicalFunction.cpp | 99 + .../EtouchesTcbufferGeoLogicalFunction.cpp | 134 + ...touchesTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/EtouchesTgeoGeoLogicalFunction.cpp | 131 + .../Meos/EtouchesTgeoTgeoLogicalFunction.cpp | 137 + .../Meos/EtouchesTpointGeoLogicalFunction.cpp | 131 + .../EtouchesTrgeometryGeoLogicalFunction.cpp | 87 + .../EverEqBigintTbigintLogicalFunction.cpp | 128 + .../Meos/EverEqBoolTboolLogicalFunction.cpp | 128 + .../Meos/EverEqFloatTfloatLogicalFunction.cpp | 128 + .../EverEqGeoTrgeometryLogicalFunction.cpp | 111 + .../Meos/EverEqIntTintLogicalFunction.cpp | 128 + .../EverEqNpointTnpointLogicalFunction.cpp | 134 + .../Meos/EverEqPoseTposeLogicalFunction.cpp | 140 + .../EverEqTbigintBigintLogicalFunction.cpp | 128 + .../Meos/EverEqTboolBoolLogicalFunction.cpp | 128 + .../EverEqTcbufferCbufferLogicalFunction.cpp | 134 + .../EverEqTcbufferTcbufferLogicalFunction.cpp | 143 + .../EverEqTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/EverEqTextTtextLogicalFunction.cpp | 128 + .../Meos/EverEqTfloatFloatLogicalFunction.cpp | 128 + .../Meos/EverEqTgeoGeoLogicalFunction.cpp | 131 + .../Meos/EverEqTgeoTgeoLogicalFunction.cpp | 137 + .../EverEqTh3indexH3indexLogicalFunction.cpp | 128 + .../Meos/EverEqTintIntLogicalFunction.cpp | 128 + .../Meos/EverEqTjsonbJsonbLogicalFunction.cpp | 128 + .../EverEqTjsonbTjsonbLogicalFunction.cpp | 131 + .../EverEqTnpointNpointLogicalFunction.cpp | 134 + .../EverEqTnpointTnpointLogicalFunction.cpp | 137 + .../Meos/EverEqTposePoseLogicalFunction.cpp | 140 + .../Meos/EverEqTposeTposeLogicalFunction.cpp | 143 + .../EverEqTquadbinQuadbinLogicalFunction.cpp | 128 + .../EverEqTrgeometryGeoLogicalFunction.cpp | 111 + ...rEqTrgeometryTrgeometryLogicalFunction.cpp | 123 + .../Meos/EverEqTtextTextLogicalFunction.cpp | 128 + .../EverGeBigintTbigintLogicalFunction.cpp | 128 + .../Meos/EverGeFloatTfloatLogicalFunction.cpp | 128 + .../Meos/EverGeIntTintLogicalFunction.cpp | 128 + .../EverGeTbigintBigintLogicalFunction.cpp | 128 + .../EverGeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/EverGeTextTtextLogicalFunction.cpp | 128 + .../Meos/EverGeTfloatFloatLogicalFunction.cpp | 128 + .../Meos/EverGeTintIntLogicalFunction.cpp | 128 + .../Meos/EverGeTtextTextLogicalFunction.cpp | 128 + .../EverGtBigintTbigintLogicalFunction.cpp | 128 + .../Meos/EverGtFloatTfloatLogicalFunction.cpp | 128 + .../Meos/EverGtIntTintLogicalFunction.cpp | 128 + .../EverGtTbigintBigintLogicalFunction.cpp | 128 + .../EverGtTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/EverGtTextTtextLogicalFunction.cpp | 128 + .../Meos/EverGtTfloatFloatLogicalFunction.cpp | 128 + .../Meos/EverGtTintIntLogicalFunction.cpp | 128 + .../Meos/EverGtTtextTextLogicalFunction.cpp | 128 + .../EverLeBigintTbigintLogicalFunction.cpp | 128 + .../Meos/EverLeFloatTfloatLogicalFunction.cpp | 128 + .../Meos/EverLeIntTintLogicalFunction.cpp | 128 + .../EverLeTbigintBigintLogicalFunction.cpp | 128 + .../EverLeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/EverLeTextTtextLogicalFunction.cpp | 128 + .../Meos/EverLeTfloatFloatLogicalFunction.cpp | 128 + .../Meos/EverLeTintIntLogicalFunction.cpp | 128 + .../Meos/EverLeTtextTextLogicalFunction.cpp | 128 + .../EverLtBigintTbigintLogicalFunction.cpp | 128 + .../Meos/EverLtFloatTfloatLogicalFunction.cpp | 128 + .../Meos/EverLtIntTintLogicalFunction.cpp | 128 + .../EverLtTbigintBigintLogicalFunction.cpp | 128 + .../EverLtTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/EverLtTextTtextLogicalFunction.cpp | 128 + .../Meos/EverLtTfloatFloatLogicalFunction.cpp | 128 + .../Meos/EverLtTintIntLogicalFunction.cpp | 128 + .../Meos/EverLtTtextTextLogicalFunction.cpp | 128 + .../EverNeBigintTbigintLogicalFunction.cpp | 128 + .../Meos/EverNeBoolTboolLogicalFunction.cpp | 128 + .../Meos/EverNeFloatTfloatLogicalFunction.cpp | 128 + .../EverNeGeoTrgeometryLogicalFunction.cpp | 111 + .../Meos/EverNeIntTintLogicalFunction.cpp | 128 + .../EverNeNpointTnpointLogicalFunction.cpp | 134 + .../Meos/EverNePoseTposeLogicalFunction.cpp | 140 + .../EverNeTbigintBigintLogicalFunction.cpp | 128 + .../Meos/EverNeTboolBoolLogicalFunction.cpp | 128 + .../EverNeTcbufferCbufferLogicalFunction.cpp | 134 + .../EverNeTcbufferTcbufferLogicalFunction.cpp | 143 + .../EverNeTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/EverNeTextTtextLogicalFunction.cpp | 128 + .../Meos/EverNeTfloatFloatLogicalFunction.cpp | 128 + .../Meos/EverNeTgeoGeoLogicalFunction.cpp | 131 + .../Meos/EverNeTgeoTgeoLogicalFunction.cpp | 137 + .../EverNeTh3indexH3indexLogicalFunction.cpp | 128 + .../Meos/EverNeTintIntLogicalFunction.cpp | 128 + .../Meos/EverNeTjsonbJsonbLogicalFunction.cpp | 128 + .../EverNeTjsonbTjsonbLogicalFunction.cpp | 131 + .../EverNeTnpointNpointLogicalFunction.cpp | 134 + .../EverNeTnpointTnpointLogicalFunction.cpp | 137 + .../Meos/EverNeTposePoseLogicalFunction.cpp | 140 + .../Meos/EverNeTposeTposeLogicalFunction.cpp | 143 + .../EverNeTquadbinQuadbinLogicalFunction.cpp | 128 + .../EverNeTrgeometryGeoLogicalFunction.cpp | 111 + ...rNeTrgeometryTrgeometryLogicalFunction.cpp | 123 + .../Meos/EverNeTtextTextLogicalFunction.cpp | 128 + .../Meos/FloatspanLowerIncLogicalFunction.cpp | 122 + .../Meos/FloatspanLowerLogicalFunction.cpp | 122 + .../Meos/FloatspanUpperIncLogicalFunction.cpp | 122 + .../Meos/FloatspanUpperLogicalFunction.cpp | 122 + .../Meos/FloatspanWidthLogicalFunction.cpp | 122 + .../Meos/FrontStboxStboxLogicalFunction.cpp | 125 + .../FrontStboxTspatialLogicalFunction.cpp | 131 + .../FrontTspatialStboxLogicalFunction.cpp | 131 + .../FrontTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/GeoAsEwktLogicalFunction.cpp | 125 + .../Meos/GeoAsGeojsonLogicalFunction.cpp | 128 + .../Meos/GeoEqualsLogicalFunction.cpp | 125 + .../Functions/Meos/GeoGeoNLogicalFunction.cpp | 125 + .../Meos/GeoIsUnitaryLogicalFunction.cpp | 122 + .../Meos/GeoNumGeosLogicalFunction.cpp | 122 + .../Meos/GeoNumPointsLogicalFunction.cpp | 122 + .../Meos/GeoPointsLogicalFunction.cpp | 122 + .../Meos/GeoReverseLogicalFunction.cpp | 122 + .../Meos/GeoRoundLogicalFunction.cpp | 125 + .../Functions/Meos/GeoSameLogicalFunction.cpp | 125 + .../Meos/GeoSetSridLogicalFunction.cpp | 125 + .../Functions/Meos/GeoSridLogicalFunction.cpp | 122 + .../Meos/GeoTransformLogicalFunction.cpp | 125 + .../Meos/GeogAreaLogicalFunction.cpp | 122 + .../Meos/GeogCentroidLogicalFunction.cpp | 125 + .../Meos/GeogDistanceLogicalFunction.cpp | 125 + .../Meos/GeogDwithinLogicalFunction.cpp | 128 + .../Meos/GeogIntersectsLogicalFunction.cpp | 125 + .../Meos/GeogLengthLogicalFunction.cpp | 122 + .../Meos/GeogPerimeterLogicalFunction.cpp | 122 + .../Meos/GeogPointMake2dLogicalFunction.cpp | 128 + .../Meos/GeogPointMake3dzLogicalFunction.cpp | 131 + .../Meos/GeogToGeomLogicalFunction.cpp | 122 + .../Meos/GeomAzimuthLogicalFunction.cpp | 122 + .../Meos/GeomBoundaryLogicalFunction.cpp | 122 + .../Meos/GeomCentroidLogicalFunction.cpp | 122 + .../Meos/GeomContainsLogicalFunction.cpp | 125 + .../Meos/GeomConvexHullLogicalFunction.cpp | 122 + .../Meos/GeomCoversLogicalFunction.cpp | 125 + .../Meos/GeomDifference2dLogicalFunction.cpp | 125 + .../Meos/GeomDisjoint2dLogicalFunction.cpp | 125 + .../Meos/GeomDistance2dLogicalFunction.cpp | 125 + .../Meos/GeomDistance3dLogicalFunction.cpp | 125 + .../Meos/GeomDwithin2dLogicalFunction.cpp | 128 + .../Meos/GeomDwithin3dLogicalFunction.cpp | 128 + .../Meos/GeomDwithinLogicalFunction.cpp | 128 + .../GeomIntersection2dCollLogicalFunction.cpp | 125 + .../GeomIntersection2dLogicalFunction.cpp | 125 + .../Meos/GeomIntersects2dLogicalFunction.cpp | 125 + .../Meos/GeomIntersects3dLogicalFunction.cpp | 125 + .../Meos/GeomIntersectsLogicalFunction.cpp | 125 + .../Meos/GeomIsEmptyLogicalFunction.cpp | 122 + .../Meos/GeomLengthLogicalFunction.cpp | 122 + .../Meos/GeomPerimeterLogicalFunction.cpp | 122 + .../Meos/GeomPointMake2dLogicalFunction.cpp | 128 + .../Meos/GeomPointMake3dzLogicalFunction.cpp | 131 + .../GeomShortestline2dLogicalFunction.cpp | 125 + .../GeomShortestline3dLogicalFunction.cpp | 125 + .../Meos/GeomToGeogLogicalFunction.cpp | 122 + .../Meos/GeomTouchesLogicalFunction.cpp | 125 + .../Meos/GeomUnaryUnionLogicalFunction.cpp | 122 + .../Meos/H3indexCmpLogicalFunction.cpp | 125 + .../Meos/H3indexEqLogicalFunction.cpp | 125 + .../Meos/H3indexGeLogicalFunction.cpp | 125 + .../Meos/H3indexGtLogicalFunction.cpp | 125 + .../Meos/H3indexLeLogicalFunction.cpp | 125 + .../Meos/H3indexLtLogicalFunction.cpp | 125 + .../Meos/H3indexNeLogicalFunction.cpp | 125 + .../Meos/H3indexOutLogicalFunction.cpp | 122 + .../Meos/IntspanLowerIncLogicalFunction.cpp | 122 + .../Meos/IntspanLowerLogicalFunction.cpp | 122 + .../Meos/IntspanUpperIncLogicalFunction.cpp | 122 + .../Meos/IntspanUpperLogicalFunction.cpp | 122 + .../Meos/IntspanWidthLogicalFunction.cpp | 122 + .../JsonbArrayElementTextLogicalFunction.cpp | 125 + .../Meos/JsonbArrayLengthLogicalFunction.cpp | 122 + .../Meos/JsonbCmpLogicalFunction.cpp | 125 + .../Meos/JsonbContainedLogicalFunction.cpp | 125 + .../Meos/JsonbContainsLogicalFunction.cpp | 125 + .../Functions/Meos/JsonbEqLogicalFunction.cpp | 125 + .../Meos/JsonbExistsLogicalFunction.cpp | 125 + .../Functions/Meos/JsonbGeLogicalFunction.cpp | 125 + .../Functions/Meos/JsonbGtLogicalFunction.cpp | 125 + .../Functions/Meos/JsonbLeLogicalFunction.cpp | 125 + .../Functions/Meos/JsonbLtLogicalFunction.cpp | 125 + .../Functions/Meos/JsonbNeLogicalFunction.cpp | 125 + .../JsonbObjectFieldTextLogicalFunction.cpp | 125 + .../Meos/JsonbPrettyLogicalFunction.cpp | 122 + .../Meos/JsonbToCstringLogicalFunction.cpp | 122 + .../Meos/LeftStboxStboxLogicalFunction.cpp | 125 + .../Meos/LeftStboxTspatialLogicalFunction.cpp | 131 + .../Meos/LeftTboxTnumberLogicalFunction.cpp | 128 + .../Meos/LeftTnumberTboxLogicalFunction.cpp | 128 + .../LeftTnumberTnumberLogicalFunction.cpp | 125 + .../Meos/LeftTspatialStboxLogicalFunction.cpp | 131 + .../LeftTspatialTspatialLogicalFunction.cpp | 137 + .../LineInterpolatePointLogicalFunction.cpp | 125 + .../Meos/LineLocatePointLogicalFunction.cpp | 125 + .../Meos/LineNumpointsLogicalFunction.cpp | 122 + .../Meos/LinePointNLogicalFunction.cpp | 125 + .../Meos/LineSubstringLogicalFunction.cpp | 128 + ...istanceTcbufferTcbufferLogicalFunction.cpp | 146 + .../Meos/MulBigintTbigintLogicalFunction.cpp | 128 + .../Meos/MulFloatTfloatLogicalFunction.cpp | 128 + .../Meos/MulIntTintLogicalFunction.cpp | 128 + .../Meos/MulTbigintBigintLogicalFunction.cpp | 128 + .../Meos/MulTfloatFloatLogicalFunction.cpp | 128 + .../Meos/MulTintIntLogicalFunction.cpp | 128 + .../Meos/MulTnumberTnumberLogicalFunction.cpp | 125 + .../MultTnumberTnumberLogicalFunction.cpp | 125 + .../Meos/NadStboxStboxLogicalFunction.cpp | 125 + .../Meos/NadTcbufferGeoLogicalFunction.cpp | 134 + .../Meos/NadTcbufferStboxLogicalFunction.cpp | 134 + .../NadTcbufferTcbufferLogicalFunction.cpp | 143 + .../Meos/NadTfloatTboxLogicalFunction.cpp | 128 + .../Meos/NadTgeoGeoLogicalFunction.cpp | 131 + .../Meos/NadTgeoStboxLogicalFunction.cpp | 131 + .../Meos/NadTgeoTgeoLogicalFunction.cpp | 137 + .../Meos/NadTintTboxLogicalFunction.cpp | 128 + .../Meos/NadTnpointGeoLogicalFunction.cpp | 131 + .../Meos/NadTnpointNpointLogicalFunction.cpp | 134 + .../Meos/NadTnpointStboxLogicalFunction.cpp | 131 + .../Meos/NadTnpointTnpointLogicalFunction.cpp | 137 + .../Meos/NadTposeGeoLogicalFunction.cpp | 134 + .../Meos/NadTposePoseLogicalFunction.cpp | 140 + .../Meos/NadTposeStboxLogicalFunction.cpp | 134 + .../Meos/NadTposeTposeLogicalFunction.cpp | 143 + .../Meos/NadTrgeometryGeoLogicalFunction.cpp | 111 + ...NadTrgeometryTrgeometryLogicalFunction.cpp | 123 + .../OveraboveStboxStboxLogicalFunction.cpp | 125 + .../OveraboveStboxTspatialLogicalFunction.cpp | 131 + .../OveraboveTspatialStboxLogicalFunction.cpp | 131 + ...eraboveTspatialTspatialLogicalFunction.cpp | 137 + .../OverafterStboxStboxLogicalFunction.cpp | 125 + .../OverafterStboxTspatialLogicalFunction.cpp | 131 + .../OverafterTboxTnumberLogicalFunction.cpp | 128 + ...erafterTemporalTemporalLogicalFunction.cpp | 137 + .../OverafterTnumberTboxLogicalFunction.cpp | 128 + ...OverafterTnumberTnumberLogicalFunction.cpp | 125 + .../OverafterTspatialStboxLogicalFunction.cpp | 131 + ...erafterTspatialTspatialLogicalFunction.cpp | 137 + .../OverbackStboxStboxLogicalFunction.cpp | 125 + .../OverbackStboxTspatialLogicalFunction.cpp | 131 + .../OverbackTspatialStboxLogicalFunction.cpp | 131 + ...verbackTspatialTspatialLogicalFunction.cpp | 137 + .../OverbeforeStboxStboxLogicalFunction.cpp | 125 + ...OverbeforeStboxTspatialLogicalFunction.cpp | 131 + .../OverbeforeTboxTnumberLogicalFunction.cpp | 128 + ...rbeforeTemporalTemporalLogicalFunction.cpp | 137 + .../OverbeforeTnumberTboxLogicalFunction.cpp | 128 + ...verbeforeTnumberTnumberLogicalFunction.cpp | 125 + ...OverbeforeTspatialStboxLogicalFunction.cpp | 131 + ...rbeforeTspatialTspatialLogicalFunction.cpp | 137 + .../OverbelowStboxStboxLogicalFunction.cpp | 125 + .../OverbelowStboxTspatialLogicalFunction.cpp | 131 + .../OverbelowTspatialStboxLogicalFunction.cpp | 131 + ...erbelowTspatialTspatialLogicalFunction.cpp | 137 + .../OverfrontStboxStboxLogicalFunction.cpp | 125 + .../OverfrontStboxTspatialLogicalFunction.cpp | 131 + .../OverfrontTspatialStboxLogicalFunction.cpp | 131 + ...erfrontTspatialTspatialLogicalFunction.cpp | 137 + .../OverlapsStboxStboxLogicalFunction.cpp | 125 + .../OverlapsStboxTspatialLogicalFunction.cpp | 131 + .../OverlapsTboxTnumberLogicalFunction.cpp | 128 + ...verlapsTemporalTemporalLogicalFunction.cpp | 137 + .../OverlapsTnumberTboxLogicalFunction.cpp | 128 + .../OverlapsTnumberTnumberLogicalFunction.cpp | 125 + .../OverlapsTspatialStboxLogicalFunction.cpp | 131 + ...verlapsTspatialTspatialLogicalFunction.cpp | 137 + .../OverleftStboxStboxLogicalFunction.cpp | 125 + .../OverleftStboxTspatialLogicalFunction.cpp | 131 + .../OverleftTboxTnumberLogicalFunction.cpp | 128 + .../OverleftTnumberTboxLogicalFunction.cpp | 128 + .../OverleftTnumberTnumberLogicalFunction.cpp | 125 + .../OverleftTspatialStboxLogicalFunction.cpp | 131 + ...verleftTspatialTspatialLogicalFunction.cpp | 137 + .../OverrightStboxStboxLogicalFunction.cpp | 125 + .../OverrightStboxTspatialLogicalFunction.cpp | 131 + .../OverrightTboxTnumberLogicalFunction.cpp | 128 + .../OverrightTnumberTboxLogicalFunction.cpp | 128 + ...OverrightTnumberTnumberLogicalFunction.cpp | 125 + .../OverrightTspatialStboxLogicalFunction.cpp | 131 + ...errightTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/QuadbinCellAreaLogicalFunction.cpp | 122 + .../QuadbinCellToParentLogicalFunction.cpp | 125 + .../QuadbinCellToQuadkeyLogicalFunction.cpp | 122 + .../Meos/QuadbinCmpLogicalFunction.cpp | 125 + .../Meos/QuadbinEqLogicalFunction.cpp | 125 + .../Meos/QuadbinGeLogicalFunction.cpp | 125 + .../QuadbinGetResolutionLogicalFunction.cpp | 122 + .../Meos/QuadbinGtLogicalFunction.cpp | 125 + .../QuadbinIsValidCellLogicalFunction.cpp | 122 + .../Meos/QuadbinLeLogicalFunction.cpp | 125 + .../Meos/QuadbinLtLogicalFunction.cpp | 125 + .../Meos/QuadbinNeLogicalFunction.cpp | 125 + .../QuadbinPointToCellLogicalFunction.cpp | 128 + .../Meos/QuadbinTileToCellLogicalFunction.cpp | 128 + .../Meos/RightStboxStboxLogicalFunction.cpp | 125 + .../RightStboxTspatialLogicalFunction.cpp | 131 + .../Meos/RightTboxTnumberLogicalFunction.cpp | 128 + .../Meos/RightTnumberTboxLogicalFunction.cpp | 128 + .../RightTnumberTnumberLogicalFunction.cpp | 125 + .../RightTspatialStboxLogicalFunction.cpp | 131 + .../RightTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/SameStboxStboxLogicalFunction.cpp | 125 + .../Meos/SameStboxTspatialLogicalFunction.cpp | 131 + .../Meos/SameTboxTnumberLogicalFunction.cpp | 128 + .../SameTemporalTemporalLogicalFunction.cpp | 137 + .../Meos/SameTnumberTboxLogicalFunction.cpp | 128 + .../SameTnumberTnumberLogicalFunction.cpp | 125 + .../Meos/SameTspatialStboxLogicalFunction.cpp | 131 + .../SameTspatialTspatialLogicalFunction.cpp | 137 + .../Meos/StboxCmpLogicalFunction.cpp | 125 + .../Functions/Meos/StboxEqLogicalFunction.cpp | 125 + .../Functions/Meos/StboxGeLogicalFunction.cpp | 125 + .../Functions/Meos/StboxGtLogicalFunction.cpp | 125 + .../Functions/Meos/StboxLeLogicalFunction.cpp | 125 + .../Functions/Meos/StboxLtLogicalFunction.cpp | 125 + .../Functions/Meos/StboxNeLogicalFunction.cpp | 125 + .../Meos/SubBigintTbigintLogicalFunction.cpp | 128 + .../Meos/SubFloatTfloatLogicalFunction.cpp | 128 + .../Meos/SubIntTintLogicalFunction.cpp | 128 + .../Meos/SubTbigintBigintLogicalFunction.cpp | 128 + .../Meos/SubTfloatFloatLogicalFunction.cpp | 128 + .../Meos/SubTintIntLogicalFunction.cpp | 128 + .../Meos/SubTnumberTnumberLogicalFunction.cpp | 125 + .../Meos/TEqTextTtextLogicalFunction.cpp | 128 + .../Meos/TEqTtextTextLogicalFunction.cpp | 128 + .../Meos/TGeTextTtextLogicalFunction.cpp | 128 + .../Meos/TGeTtextTextLogicalFunction.cpp | 128 + .../Meos/TGtTextTtextLogicalFunction.cpp | 128 + .../Meos/TGtTtextTextLogicalFunction.cpp | 128 + .../Meos/TLeTextTtextLogicalFunction.cpp | 128 + .../Meos/TLeTtextTextLogicalFunction.cpp | 128 + .../Meos/TLtTextTtextLogicalFunction.cpp | 128 + .../Meos/TLtTtextTextLogicalFunction.cpp | 128 + .../Meos/TNeTextTtextLogicalFunction.cpp | 128 + .../Meos/TNeTtextTextLogicalFunction.cpp | 128 + .../Meos/TandBoolTboolLogicalFunction.cpp | 128 + .../Meos/TandTboolBoolLogicalFunction.cpp | 128 + .../Meos/TandTboolTboolLogicalFunction.cpp | 125 + .../Meos/TbigintScaleValueLogicalFunction.cpp | 128 + .../TbigintShiftScaleValueLogicalFunction.cpp | 131 + .../Meos/TbigintShiftValueLogicalFunction.cpp | 128 + .../Meos/TbigintToTfloatLogicalFunction.cpp | 125 + .../Meos/TbigintToTintLogicalFunction.cpp | 125 + .../Meos/TboolEndValueLogicalFunction.cpp | 125 + .../Meos/TboolStartValueLogicalFunction.cpp | 125 + .../Meos/TboolToTintLogicalFunction.cpp | 125 + .../Meos/TcbufferToTfloatLogicalFunction.cpp | 131 + ...ontainsTcbufferTcbufferLogicalFunction.cpp | 125 + .../Meos/TcontainsTgeoTgeoLogicalFunction.cpp | 125 + ...TcoversTcbufferTcbufferLogicalFunction.cpp | 125 + .../Meos/TcoversTgeoTgeoLogicalFunction.cpp | 125 + ...istanceTcbufferTcbufferLogicalFunction.cpp | 125 + .../TdistanceTfloatFloatLogicalFunction.cpp | 128 + .../Meos/TdistanceTgeoTgeoLogicalFunction.cpp | 125 + .../Meos/TdistanceTintIntLogicalFunction.cpp | 128 + ...TdistanceTnpointTnpointLogicalFunction.cpp | 125 + ...TdistanceTnumberTnumberLogicalFunction.cpp | 125 + .../TdistanceTposeTposeLogicalFunction.cpp | 125 + ...mporalAContainsGeometryLogicalFunction.cpp | 131 + ...ContainsTCbufferCbufferLogicalFunction.cpp | 134 + ...mporalAContainsTCbufferLogicalFunction.cpp | 134 + ...poralAContainsTGeometryLogicalFunction.cpp | 137 + ...ContainsTNpointGeometryLogicalFunction.cpp | 131 + ...AContainsTNpointTNpointLogicalFunction.cpp | 137 + ...lAContainsTPoseGeometryLogicalFunction.cpp | 134 + ...oralAContainsTPoseTPoseLogicalFunction.cpp | 143 + ...lACoversTCbufferCbufferLogicalFunction.cpp | 134 + ...TemporalACoversTCbufferLogicalFunction.cpp | 134 + ...emporalADWithinGeometryLogicalFunction.cpp | 134 + ...ADWithinTCbufferCbufferLogicalFunction.cpp | 137 + ...DWithinTCbufferGeometryLogicalFunction.cpp | 137 + ...DWithinTCbufferTCbufferLogicalFunction.cpp | 146 + ...mporalADWithinTGeometryLogicalFunction.cpp | 140 + ...ADWithinTNpointGeometryLogicalFunction.cpp | 134 + ...lADWithinTNpointTNpointLogicalFunction.cpp | 140 + ...alADWithinTPoseGeometryLogicalFunction.cpp | 137 + ...poralADWithinTPoseTPoseLogicalFunction.cpp | 146 + ...mporalADisjointGeometryLogicalFunction.cpp | 131 + ...DisjointTCbufferCbufferLogicalFunction.cpp | 134 + ...mporalADisjointTCbufferLogicalFunction.cpp | 134 + ...isjointTCbufferTCbufferLogicalFunction.cpp | 143 + ...poralADisjointTGeometryLogicalFunction.cpp | 137 + ...DisjointTNpointGeometryLogicalFunction.cpp | 131 + ...ADisjointTNpointTNpointLogicalFunction.cpp | 137 + ...lADisjointTPoseGeometryLogicalFunction.cpp | 134 + ...oralADisjointTPoseTPoseLogicalFunction.cpp | 143 + ...oralAIntersectsGeometryLogicalFunction.cpp | 142 +- ...tersectsTCbufferCbufferLogicalFunction.cpp | 134 + ...oralAIntersectsTCbufferLogicalFunction.cpp | 134 + ...ersectsTCbufferTCbufferLogicalFunction.cpp | 143 + ...ralAIntersectsTGeometryLogicalFunction.cpp | 137 + ...tersectsTNpointGeometryLogicalFunction.cpp | 131 + ...ntersectsTNpointTNpointLogicalFunction.cpp | 137 + ...IntersectsTPoseGeometryLogicalFunction.cpp | 134 + ...alAIntersectsTPoseTPoseLogicalFunction.cpp | 143 + ...emporalATouchesGeometryLogicalFunction.cpp | 131 + ...ATouchesTCbufferCbufferLogicalFunction.cpp | 134 + ...emporalATouchesTCbufferLogicalFunction.cpp | 134 + ...TouchesTCbufferTCbufferLogicalFunction.cpp | 143 + ...mporalATouchesTGeometryLogicalFunction.cpp | 137 + ...ATouchesTNpointGeometryLogicalFunction.cpp | 131 + ...lATouchesTNpointTNpointLogicalFunction.cpp | 137 + ...alATouchesTPoseGeometryLogicalFunction.cpp | 134 + ...poralATouchesTPoseTPoseLogicalFunction.cpp | 143 + .../TemporalAtGeometryLogicalFunction.cpp | 131 + .../Meos/TemporalAtStBoxLogicalFunction.cpp | 96 +- .../Meos/TemporalCmpLogicalFunction.cpp | 137 + ...oralDyntimewarpDistanceLogicalFunction.cpp | 137 + ...mporalEContainsGeometryLogicalFunction.cpp | 213 +- ...ContainsTCbufferCbufferLogicalFunction.cpp | 134 + ...mporalEContainsTCbufferLogicalFunction.cpp | 134 + ...poralEContainsTGeometryLogicalFunction.cpp | 137 + ...ContainsTNpointGeometryLogicalFunction.cpp | 131 + ...EContainsTNpointTNpointLogicalFunction.cpp | 137 + ...lEContainsTPoseGeometryLogicalFunction.cpp | 134 + ...oralEContainsTPoseTPoseLogicalFunction.cpp | 143 + ...TemporalECoversGeometryLogicalFunction.cpp | 131 + ...lECoversTCbufferCbufferLogicalFunction.cpp | 134 + ...TemporalECoversTCbufferLogicalFunction.cpp | 134 + ...ECoversTCbufferTCbufferLogicalFunction.cpp | 143 + ...emporalECoversTGeometryLogicalFunction.cpp | 137 + ...lECoversTNpointGeometryLogicalFunction.cpp | 131 + ...alECoversTNpointTNpointLogicalFunction.cpp | 137 + ...ralECoversTPoseGeometryLogicalFunction.cpp | 134 + ...mporalECoversTPoseTPoseLogicalFunction.cpp | 143 + ...emporalEDWithinGeometryLogicalFunction.cpp | 58 +- ...EDWithinTCbufferCbufferLogicalFunction.cpp | 137 + ...DWithinTCbufferGeometryLogicalFunction.cpp | 137 + ...DWithinTCbufferTCbufferLogicalFunction.cpp | 146 + ...mporalEDWithinTGeometryLogicalFunction.cpp | 140 + ...EDWithinTNpointGeometryLogicalFunction.cpp | 134 + ...lEDWithinTNpointTNpointLogicalFunction.cpp | 140 + ...alEDWithinTPoseGeometryLogicalFunction.cpp | 137 + ...poralEDWithinTPoseTPoseLogicalFunction.cpp | 146 + ...mporalEDisjointGeometryLogicalFunction.cpp | 131 + ...DisjointTCbufferCbufferLogicalFunction.cpp | 134 + ...mporalEDisjointTCbufferLogicalFunction.cpp | 134 + ...poralEDisjointTGeometryLogicalFunction.cpp | 137 + ...DisjointTNpointGeometryLogicalFunction.cpp | 131 + ...EDisjointTNpointTNpointLogicalFunction.cpp | 137 + ...lEDisjointTPoseGeometryLogicalFunction.cpp | 134 + ...oralEDisjointTPoseTPoseLogicalFunction.cpp | 143 + ...oralEIntersectsGeometryLogicalFunction.cpp | 131 + ...tersectsTCbufferCbufferLogicalFunction.cpp | 134 + ...oralEIntersectsTCbufferLogicalFunction.cpp | 134 + ...ersectsTCbufferTCbufferLogicalFunction.cpp | 143 + ...ralEIntersectsTGeometryLogicalFunction.cpp | 137 + ...tersectsTNpointGeometryLogicalFunction.cpp | 131 + ...ntersectsTNpointTNpointLogicalFunction.cpp | 137 + ...IntersectsTPoseGeometryLogicalFunction.cpp | 134 + ...alEIntersectsTPoseTPoseLogicalFunction.cpp | 143 + ...emporalETouchesGeometryLogicalFunction.cpp | 131 + ...ETouchesTCbufferCbufferLogicalFunction.cpp | 134 + ...emporalETouchesTCbufferLogicalFunction.cpp | 134 + ...TouchesTCbufferTCbufferLogicalFunction.cpp | 143 + ...mporalETouchesTGeometryLogicalFunction.cpp | 137 + ...ETouchesTNpointGeometryLogicalFunction.cpp | 131 + ...lETouchesTNpointTNpointLogicalFunction.cpp | 137 + ...alETouchesTPoseGeometryLogicalFunction.cpp | 134 + ...poralETouchesTPoseTPoseLogicalFunction.cpp | 143 + .../Meos/TemporalEqLogicalFunction.cpp | 137 + ...TemporalFrechetDistanceLogicalFunction.cpp | 137 + .../Meos/TemporalGeLogicalFunction.cpp | 137 + .../Meos/TemporalGtLogicalFunction.cpp | 137 + ...mporalHausdorffDistanceLogicalFunction.cpp | 137 + ...poralIntersectsGeometryLogicalFunction.cpp | 141 +- .../Meos/TemporalLeLogicalFunction.cpp | 137 + .../Meos/TemporalLtLogicalFunction.cpp | 137 + .../TemporalMinusGeometryLogicalFunction.cpp | 131 + .../TemporalNADFloatScalarLogicalFunction.cpp | 128 + .../TemporalNADGeometryLogicalFunction.cpp | 137 + .../TemporalNADIntScalarLogicalFunction.cpp | 128 + ...poralNADTCbufferCbufferLogicalFunction.cpp | 134 + .../TemporalNADTCbufferLogicalFunction.cpp | 134 + ...oralNADTCbufferTCbufferLogicalFunction.cpp | 143 + .../Meos/TemporalNADTFloatLogicalFunction.cpp | 131 + .../TemporalNADTGeometryLogicalFunction.cpp | 137 + .../Meos/TemporalNADTIntLogicalFunction.cpp | 131 + ...poralNADTNpointGeometryLogicalFunction.cpp | 131 + ...mporalNADTNpointTNpointLogicalFunction.cpp | 137 + ...emporalNADTPoseGeometryLogicalFunction.cpp | 134 + .../TemporalNADTPoseTPoseLogicalFunction.cpp | 143 + .../Meos/TemporalNeLogicalFunction.cpp | 137 + .../Meos/TemporalRoundLogicalFunction.cpp | 128 + .../Meos/TeqBoolTboolLogicalFunction.cpp | 128 + .../Meos/TeqTboolBoolLogicalFunction.cpp | 128 + .../Meos/TextInitcapLogicalFunction.cpp | 122 + .../Meos/TextLowerLogicalFunction.cpp | 122 + .../Meos/TextUpperLogicalFunction.cpp | 122 + .../Meos/TextcatTextTtextLogicalFunction.cpp | 128 + .../Meos/TextcatTtextTextLogicalFunction.cpp | 128 + .../Meos/TextcatTtextTtextLogicalFunction.cpp | 131 + .../Meos/TfloatCeilLogicalFunction.cpp | 125 + .../Meos/TfloatExpLogicalFunction.cpp | 125 + .../Meos/TfloatFloorLogicalFunction.cpp | 125 + .../Meos/TfloatLnLogicalFunction.cpp | 125 + .../Meos/TfloatLog10LogicalFunction.cpp | 125 + .../Meos/TfloatRadiansLogicalFunction.cpp | 125 + .../Meos/TfloatScaleValueLogicalFunction.cpp | 128 + .../TfloatShiftScaleValueLogicalFunction.cpp | 131 + .../Meos/TfloatShiftValueLogicalFunction.cpp | 128 + .../Meos/TfloatToTbigintLogicalFunction.cpp | 125 + .../Meos/TfloatToTintLogicalFunction.cpp | 125 + ...h3indexAreNeighborCellsLogicalFunction.cpp | 131 + ...3indexCellToCenterChildLogicalFunction.cpp | 128 + ...exCellToCenterChildNextLogicalFunction.cpp | 128 + .../Th3indexCellToChildPosLogicalFunction.cpp | 128 + .../Th3indexCellToParentLogicalFunction.cpp | 128 + ...h3indexCellToParentNextLogicalFunction.cpp | 128 + ...3indexGetBaseCellNumberLogicalFunction.cpp | 125 + .../Th3indexGetResolutionLogicalFunction.cpp | 125 + .../Th3indexGridDistanceLogicalFunction.cpp | 131 + .../Th3indexIsPentagonLogicalFunction.cpp | 125 + .../Th3indexIsValidCellLogicalFunction.cpp | 125 + .../Meos/TintScaleValueLogicalFunction.cpp | 128 + .../TintShiftScaleValueLogicalFunction.cpp | 131 + .../Meos/TintShiftValueLogicalFunction.cpp | 128 + .../Meos/TintToTbigintLogicalFunction.cpp | 125 + .../Meos/TintToTfloatLogicalFunction.cpp | 125 + .../Meos/TneBoolTboolLogicalFunction.cpp | 128 + .../Meos/TneTboolBoolLogicalFunction.cpp | 128 + .../Meos/TnotTboolLogicalFunction.cpp | 125 + .../Meos/TnpointLengthLogicalFunction.cpp | 128 + .../Meos/TorBoolTboolLogicalFunction.cpp | 128 + .../Meos/TorTboolBoolLogicalFunction.cpp | 128 + .../Meos/TorTboolTboolLogicalFunction.cpp | 125 + .../Meos/TpointLengthWkbLogicalFunction.cpp | 122 + .../Meos/TtextInitcapLogicalFunction.cpp | 125 + .../Meos/TtextLowerLogicalFunction.cpp | 125 + .../Meos/TtextUpperLogicalFunction.cpp | 125 + .../Meos/AboveStboxStboxPhysicalFunction.hpp | 42 + .../AboveStboxTspatialPhysicalFunction.hpp | 44 + .../AboveTspatialStboxPhysicalFunction.hpp | 44 + .../AboveTspatialTspatialPhysicalFunction.hpp | 46 + ...AcontainsGeoTrgeometryPhysicalFunction.hpp | 32 + .../AcontainsTcbufferGeoPhysicalFunction.hpp | 45 + ...ntainsTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/AcontainsTgeoGeoPhysicalFunction.hpp | 44 + .../AcontainsTgeoTgeoPhysicalFunction.hpp | 46 + .../AcoversGeoTrgeometryPhysicalFunction.hpp | 32 + .../AcoversTcbufferGeoPhysicalFunction.hpp | 45 + ...coversTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/AcoversTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/AcoversTgeoTgeoPhysicalFunction.hpp | 46 + .../AcoversTrgeometryGeoPhysicalFunction.hpp | 32 + .../Meos/AddBigintTbigintPhysicalFunction.hpp | 43 + .../Meos/AddFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/AddIntTintPhysicalFunction.hpp | 43 + .../Meos/AddTbigintBigintPhysicalFunction.hpp | 43 + .../Meos/AddTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AddTintIntPhysicalFunction.hpp | 43 + .../AddTnumberTnumberPhysicalFunction.hpp | 42 + .../AdisjointTcbufferGeoPhysicalFunction.hpp | 45 + ...sjointTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/AdisjointTgeoGeoPhysicalFunction.hpp | 44 + .../AdisjointTgeoTgeoPhysicalFunction.hpp | 46 + ...AdisjointTrgeometryGeoPhysicalFunction.hpp | 32 + ...ntTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../AdjacentStboxStboxPhysicalFunction.hpp | 42 + .../AdjacentStboxTspatialPhysicalFunction.hpp | 44 + .../AdjacentTboxTnumberPhysicalFunction.hpp | 43 + ...jacentTemporalTemporalPhysicalFunction.hpp | 46 + .../AdjacentTnumberTboxPhysicalFunction.hpp | 43 + ...AdjacentTnumberTnumberPhysicalFunction.hpp | 42 + .../AdjacentTspatialStboxPhysicalFunction.hpp | 44 + ...jacentTspatialTspatialPhysicalFunction.hpp | 46 + ...dwithinTcbufferCbufferPhysicalFunction.hpp | 46 + .../AdwithinTcbufferGeoPhysicalFunction.hpp | 46 + ...withinTcbufferTcbufferPhysicalFunction.hpp | 49 + .../Meos/AdwithinTgeoGeoPhysicalFunction.hpp | 45 + .../Meos/AdwithinTgeoTgeoPhysicalFunction.hpp | 47 + .../AdwithinTrgeometryGeoPhysicalFunction.hpp | 32 + ...inTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../Meos/AfterStboxStboxPhysicalFunction.hpp | 42 + .../AfterStboxTspatialPhysicalFunction.hpp | 44 + .../Meos/AfterTboxTnumberPhysicalFunction.hpp | 43 + .../AfterTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/AfterTnumberTboxPhysicalFunction.hpp | 43 + .../AfterTnumberTnumberPhysicalFunction.hpp | 42 + .../AfterTspatialStboxPhysicalFunction.hpp | 44 + .../AfterTspatialTspatialPhysicalFunction.hpp | 46 + ...AintersectsTcbufferGeoPhysicalFunction.hpp | 45 + ...rsectsTcbufferTcbufferPhysicalFunction.hpp | 48 + .../AintersectsTgeoGeoPhysicalFunction.hpp | 44 + .../AintersectsTgeoTgeoPhysicalFunction.hpp | 46 + ...ntersectsTrgeometryGeoPhysicalFunction.hpp | 32 + ...tsTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../AlwaysEqBigintTbigintPhysicalFunction.hpp | 43 + .../AlwaysEqBoolTboolPhysicalFunction.hpp | 43 + .../AlwaysEqFloatTfloatPhysicalFunction.hpp | 43 + .../AlwaysEqGeoTrgeometryPhysicalFunction.hpp | 32 + .../Meos/AlwaysEqIntTintPhysicalFunction.hpp | 43 + .../AlwaysEqNpointTnpointPhysicalFunction.hpp | 45 + .../AlwaysEqPoseTposePhysicalFunction.hpp | 47 + .../AlwaysEqTbigintBigintPhysicalFunction.hpp | 43 + .../AlwaysEqTboolBoolPhysicalFunction.hpp | 43 + ...lwaysEqTcbufferCbufferPhysicalFunction.hpp | 45 + ...waysEqTcbufferTcbufferPhysicalFunction.hpp | 48 + ...waysEqTemporalTemporalPhysicalFunction.hpp | 46 + .../AlwaysEqTextTtextPhysicalFunction.hpp | 43 + .../AlwaysEqTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysEqTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/AlwaysEqTgeoTgeoPhysicalFunction.hpp | 46 + ...lwaysEqTh3indexH3indexPhysicalFunction.hpp | 43 + .../Meos/AlwaysEqTintIntPhysicalFunction.hpp | 43 + .../AlwaysEqTjsonbJsonbPhysicalFunction.hpp | 43 + .../AlwaysEqTjsonbTjsonbPhysicalFunction.hpp | 44 + .../AlwaysEqTnpointNpointPhysicalFunction.hpp | 45 + ...AlwaysEqTnpointTnpointPhysicalFunction.hpp | 46 + .../AlwaysEqTposePosePhysicalFunction.hpp | 47 + .../AlwaysEqTposeTposePhysicalFunction.hpp | 48 + ...lwaysEqTquadbinQuadbinPhysicalFunction.hpp | 43 + .../AlwaysEqTrgeometryGeoPhysicalFunction.hpp | 32 + ...EqTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../AlwaysEqTtextTextPhysicalFunction.hpp | 43 + .../AlwaysGeBigintTbigintPhysicalFunction.hpp | 43 + .../AlwaysGeFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysGeIntTintPhysicalFunction.hpp | 43 + .../AlwaysGeTbigintBigintPhysicalFunction.hpp | 43 + ...waysGeTemporalTemporalPhysicalFunction.hpp | 46 + .../AlwaysGeTextTtextPhysicalFunction.hpp | 43 + .../AlwaysGeTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysGeTintIntPhysicalFunction.hpp | 43 + .../AlwaysGeTtextTextPhysicalFunction.hpp | 43 + .../AlwaysGtBigintTbigintPhysicalFunction.hpp | 43 + .../AlwaysGtFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysGtIntTintPhysicalFunction.hpp | 43 + .../AlwaysGtTbigintBigintPhysicalFunction.hpp | 43 + ...waysGtTemporalTemporalPhysicalFunction.hpp | 46 + .../AlwaysGtTextTtextPhysicalFunction.hpp | 43 + .../AlwaysGtTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysGtTintIntPhysicalFunction.hpp | 43 + .../AlwaysGtTtextTextPhysicalFunction.hpp | 43 + .../AlwaysLeBigintTbigintPhysicalFunction.hpp | 43 + .../AlwaysLeFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysLeIntTintPhysicalFunction.hpp | 43 + .../AlwaysLeTbigintBigintPhysicalFunction.hpp | 43 + ...waysLeTemporalTemporalPhysicalFunction.hpp | 46 + .../AlwaysLeTextTtextPhysicalFunction.hpp | 43 + .../AlwaysLeTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysLeTintIntPhysicalFunction.hpp | 43 + .../AlwaysLeTtextTextPhysicalFunction.hpp | 43 + .../AlwaysLtBigintTbigintPhysicalFunction.hpp | 43 + .../AlwaysLtFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysLtIntTintPhysicalFunction.hpp | 43 + .../AlwaysLtTbigintBigintPhysicalFunction.hpp | 43 + ...waysLtTemporalTemporalPhysicalFunction.hpp | 46 + .../AlwaysLtTextTtextPhysicalFunction.hpp | 43 + .../AlwaysLtTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysLtTintIntPhysicalFunction.hpp | 43 + .../AlwaysLtTtextTextPhysicalFunction.hpp | 43 + .../AlwaysNeBigintTbigintPhysicalFunction.hpp | 43 + .../AlwaysNeBoolTboolPhysicalFunction.hpp | 43 + .../AlwaysNeFloatTfloatPhysicalFunction.hpp | 43 + .../AlwaysNeGeoTrgeometryPhysicalFunction.hpp | 32 + .../Meos/AlwaysNeIntTintPhysicalFunction.hpp | 43 + .../AlwaysNeNpointTnpointPhysicalFunction.hpp | 45 + .../AlwaysNePoseTposePhysicalFunction.hpp | 47 + .../AlwaysNeTbigintBigintPhysicalFunction.hpp | 43 + .../AlwaysNeTboolBoolPhysicalFunction.hpp | 43 + ...lwaysNeTcbufferCbufferPhysicalFunction.hpp | 45 + ...waysNeTcbufferTcbufferPhysicalFunction.hpp | 48 + ...waysNeTemporalTemporalPhysicalFunction.hpp | 46 + .../AlwaysNeTextTtextPhysicalFunction.hpp | 43 + .../AlwaysNeTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/AlwaysNeTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/AlwaysNeTgeoTgeoPhysicalFunction.hpp | 46 + ...lwaysNeTh3indexH3indexPhysicalFunction.hpp | 43 + .../Meos/AlwaysNeTintIntPhysicalFunction.hpp | 43 + .../AlwaysNeTjsonbJsonbPhysicalFunction.hpp | 43 + .../AlwaysNeTjsonbTjsonbPhysicalFunction.hpp | 44 + .../AlwaysNeTnpointNpointPhysicalFunction.hpp | 45 + ...AlwaysNeTnpointTnpointPhysicalFunction.hpp | 46 + .../AlwaysNeTposePosePhysicalFunction.hpp | 47 + .../AlwaysNeTposeTposePhysicalFunction.hpp | 48 + ...lwaysNeTquadbinQuadbinPhysicalFunction.hpp | 43 + .../AlwaysNeTrgeometryGeoPhysicalFunction.hpp | 32 + ...NeTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../AlwaysNeTtextTextPhysicalFunction.hpp | 43 + .../AtouchesTcbufferGeoPhysicalFunction.hpp | 45 + ...ouchesTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/AtouchesTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/AtouchesTgeoTgeoPhysicalFunction.hpp | 46 + .../AtouchesTpointGeoPhysicalFunction.hpp | 44 + .../AtouchesTrgeometryGeoPhysicalFunction.hpp | 32 + .../Meos/BackStboxStboxPhysicalFunction.hpp | 42 + .../BackStboxTspatialPhysicalFunction.hpp | 44 + .../BackTspatialStboxPhysicalFunction.hpp | 44 + .../BackTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/BeforeStboxStboxPhysicalFunction.hpp | 42 + .../BeforeStboxTspatialPhysicalFunction.hpp | 44 + .../BeforeTboxTnumberPhysicalFunction.hpp | 43 + ...BeforeTemporalTemporalPhysicalFunction.hpp | 46 + .../BeforeTnumberTboxPhysicalFunction.hpp | 43 + .../BeforeTnumberTnumberPhysicalFunction.hpp | 42 + .../BeforeTspatialStboxPhysicalFunction.hpp | 44 + ...BeforeTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/BelowStboxStboxPhysicalFunction.hpp | 42 + .../BelowStboxTspatialPhysicalFunction.hpp | 44 + .../BelowTspatialStboxPhysicalFunction.hpp | 44 + .../BelowTspatialTspatialPhysicalFunction.hpp | 46 + .../ContainedFloatSpanPhysicalFunction.hpp | 42 + ...ContainedFloatspanSpanPhysicalFunction.hpp | 42 + .../Meos/ContainedIntSpanPhysicalFunction.hpp | 42 + .../ContainedSpanSpanPhysicalFunction.hpp | 42 + .../ContainedStboxStboxPhysicalFunction.hpp | 42 + ...ContainedStboxTspatialPhysicalFunction.hpp | 44 + .../ContainedTboxTnumberPhysicalFunction.hpp | 43 + ...tainedTemporalTemporalPhysicalFunction.hpp | 46 + .../ContainedTnumberTboxPhysicalFunction.hpp | 43 + ...ontainedTnumberTnumberPhysicalFunction.hpp | 42 + ...ContainedTspatialStboxPhysicalFunction.hpp | 44 + ...tainedTspatialTspatialPhysicalFunction.hpp | 46 + .../ContainsFloatspanSpanPhysicalFunction.hpp | 42 + .../ContainsSpanFloatPhysicalFunction.hpp | 42 + .../Meos/ContainsSpanIntPhysicalFunction.hpp | 42 + .../Meos/ContainsSpanSpanPhysicalFunction.hpp | 42 + .../ContainsStboxStboxPhysicalFunction.hpp | 42 + .../ContainsStboxTspatialPhysicalFunction.hpp | 44 + .../ContainsTboxTnumberPhysicalFunction.hpp | 43 + ...ntainsTemporalTemporalPhysicalFunction.hpp | 46 + .../ContainsTnumberTboxPhysicalFunction.hpp | 43 + ...ContainsTnumberTnumberPhysicalFunction.hpp | 42 + .../ContainsTspatialStboxPhysicalFunction.hpp | 44 + ...ntainsTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/DivBigintTbigintPhysicalFunction.hpp | 43 + .../Meos/DivFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/DivIntTintPhysicalFunction.hpp | 43 + .../Meos/DivTbigintBigintPhysicalFunction.hpp | 43 + .../Meos/DivTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/DivTintIntPhysicalFunction.hpp | 43 + .../DivTnumberTnumberPhysicalFunction.hpp | 42 + ...EcontainsGeoTrgeometryPhysicalFunction.hpp | 32 + .../EcontainsTcbufferGeoPhysicalFunction.hpp | 45 + ...ntainsTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/EcontainsTgeoGeoPhysicalFunction.hpp | 44 + .../EcontainsTgeoTgeoPhysicalFunction.hpp | 46 + .../EcoversGeoTrgeometryPhysicalFunction.hpp | 32 + .../EcoversTcbufferGeoPhysicalFunction.hpp | 45 + ...coversTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/EcoversTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/EcoversTgeoTgeoPhysicalFunction.hpp | 46 + .../EcoversTrgeometryGeoPhysicalFunction.hpp | 32 + .../EdisjointTcbufferGeoPhysicalFunction.hpp | 45 + ...sjointTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/EdisjointTgeoGeoPhysicalFunction.hpp | 44 + .../EdisjointTgeoTgeoPhysicalFunction.hpp | 46 + ...EdisjointTrgeometryGeoPhysicalFunction.hpp | 32 + ...ntTrgeometryTrgeometryPhysicalFunction.hpp | 32 + ...dwithinTcbufferCbufferPhysicalFunction.hpp | 46 + .../EdwithinTcbufferGeoPhysicalFunction.hpp | 46 + ...withinTcbufferTcbufferPhysicalFunction.hpp | 49 + .../Meos/EdwithinTgeoGeoPhysicalFunction.hpp | 45 + .../Meos/EdwithinTgeoTgeoPhysicalFunction.hpp | 47 + .../EdwithinTrgeometryGeoPhysicalFunction.hpp | 32 + ...inTrgeometryTrgeometryPhysicalFunction.hpp | 32 + ...EintersectsTcbufferGeoPhysicalFunction.hpp | 45 + ...rsectsTcbufferTcbufferPhysicalFunction.hpp | 48 + .../EintersectsTgeoGeoPhysicalFunction.hpp | 44 + .../EintersectsTgeoTgeoPhysicalFunction.hpp | 46 + ...ntersectsTrgeometryGeoPhysicalFunction.hpp | 32 + ...tsTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../EtouchesTcbufferGeoPhysicalFunction.hpp | 45 + ...ouchesTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/EtouchesTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/EtouchesTgeoTgeoPhysicalFunction.hpp | 46 + .../EtouchesTpointGeoPhysicalFunction.hpp | 44 + .../EtouchesTrgeometryGeoPhysicalFunction.hpp | 32 + .../EverEqBigintTbigintPhysicalFunction.hpp | 43 + .../Meos/EverEqBoolTboolPhysicalFunction.hpp | 43 + .../EverEqFloatTfloatPhysicalFunction.hpp | 43 + .../EverEqGeoTrgeometryPhysicalFunction.hpp | 32 + .../Meos/EverEqIntTintPhysicalFunction.hpp | 43 + .../EverEqNpointTnpointPhysicalFunction.hpp | 45 + .../Meos/EverEqPoseTposePhysicalFunction.hpp | 47 + .../EverEqTbigintBigintPhysicalFunction.hpp | 43 + .../Meos/EverEqTboolBoolPhysicalFunction.hpp | 43 + .../EverEqTcbufferCbufferPhysicalFunction.hpp | 45 + ...EverEqTcbufferTcbufferPhysicalFunction.hpp | 48 + ...EverEqTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/EverEqTextTtextPhysicalFunction.hpp | 43 + .../EverEqTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/EverEqTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/EverEqTgeoTgeoPhysicalFunction.hpp | 46 + .../EverEqTh3indexH3indexPhysicalFunction.hpp | 43 + .../Meos/EverEqTintIntPhysicalFunction.hpp | 43 + .../EverEqTjsonbJsonbPhysicalFunction.hpp | 43 + .../EverEqTjsonbTjsonbPhysicalFunction.hpp | 44 + .../EverEqTnpointNpointPhysicalFunction.hpp | 45 + .../EverEqTnpointTnpointPhysicalFunction.hpp | 46 + .../Meos/EverEqTposePosePhysicalFunction.hpp | 47 + .../Meos/EverEqTposeTposePhysicalFunction.hpp | 48 + .../EverEqTquadbinQuadbinPhysicalFunction.hpp | 43 + .../EverEqTrgeometryGeoPhysicalFunction.hpp | 32 + ...EqTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../Meos/EverEqTtextTextPhysicalFunction.hpp | 43 + .../EverGeBigintTbigintPhysicalFunction.hpp | 43 + .../EverGeFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/EverGeIntTintPhysicalFunction.hpp | 43 + .../EverGeTbigintBigintPhysicalFunction.hpp | 43 + ...EverGeTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/EverGeTextTtextPhysicalFunction.hpp | 43 + .../EverGeTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/EverGeTintIntPhysicalFunction.hpp | 43 + .../Meos/EverGeTtextTextPhysicalFunction.hpp | 43 + .../EverGtBigintTbigintPhysicalFunction.hpp | 43 + .../EverGtFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/EverGtIntTintPhysicalFunction.hpp | 43 + .../EverGtTbigintBigintPhysicalFunction.hpp | 43 + ...EverGtTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/EverGtTextTtextPhysicalFunction.hpp | 43 + .../EverGtTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/EverGtTintIntPhysicalFunction.hpp | 43 + .../Meos/EverGtTtextTextPhysicalFunction.hpp | 43 + .../EverLeBigintTbigintPhysicalFunction.hpp | 43 + .../EverLeFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/EverLeIntTintPhysicalFunction.hpp | 43 + .../EverLeTbigintBigintPhysicalFunction.hpp | 43 + ...EverLeTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/EverLeTextTtextPhysicalFunction.hpp | 43 + .../EverLeTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/EverLeTintIntPhysicalFunction.hpp | 43 + .../Meos/EverLeTtextTextPhysicalFunction.hpp | 43 + .../EverLtBigintTbigintPhysicalFunction.hpp | 43 + .../EverLtFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/EverLtIntTintPhysicalFunction.hpp | 43 + .../EverLtTbigintBigintPhysicalFunction.hpp | 43 + ...EverLtTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/EverLtTextTtextPhysicalFunction.hpp | 43 + .../EverLtTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/EverLtTintIntPhysicalFunction.hpp | 43 + .../Meos/EverLtTtextTextPhysicalFunction.hpp | 43 + .../EverNeBigintTbigintPhysicalFunction.hpp | 43 + .../Meos/EverNeBoolTboolPhysicalFunction.hpp | 43 + .../EverNeFloatTfloatPhysicalFunction.hpp | 43 + .../EverNeGeoTrgeometryPhysicalFunction.hpp | 32 + .../Meos/EverNeIntTintPhysicalFunction.hpp | 43 + .../EverNeNpointTnpointPhysicalFunction.hpp | 45 + .../Meos/EverNePoseTposePhysicalFunction.hpp | 47 + .../EverNeTbigintBigintPhysicalFunction.hpp | 43 + .../Meos/EverNeTboolBoolPhysicalFunction.hpp | 43 + .../EverNeTcbufferCbufferPhysicalFunction.hpp | 45 + ...EverNeTcbufferTcbufferPhysicalFunction.hpp | 48 + ...EverNeTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/EverNeTextTtextPhysicalFunction.hpp | 43 + .../EverNeTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/EverNeTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/EverNeTgeoTgeoPhysicalFunction.hpp | 46 + .../EverNeTh3indexH3indexPhysicalFunction.hpp | 43 + .../Meos/EverNeTintIntPhysicalFunction.hpp | 43 + .../EverNeTjsonbJsonbPhysicalFunction.hpp | 43 + .../EverNeTjsonbTjsonbPhysicalFunction.hpp | 44 + .../EverNeTnpointNpointPhysicalFunction.hpp | 45 + .../EverNeTnpointTnpointPhysicalFunction.hpp | 46 + .../Meos/EverNeTposePosePhysicalFunction.hpp | 47 + .../Meos/EverNeTposeTposePhysicalFunction.hpp | 48 + .../EverNeTquadbinQuadbinPhysicalFunction.hpp | 43 + .../EverNeTrgeometryGeoPhysicalFunction.hpp | 32 + ...NeTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../Meos/EverNeTtextTextPhysicalFunction.hpp | 43 + .../FloatspanLowerIncPhysicalFunction.hpp | 41 + .../Meos/FloatspanLowerPhysicalFunction.hpp | 41 + .../FloatspanUpperIncPhysicalFunction.hpp | 41 + .../Meos/FloatspanUpperPhysicalFunction.hpp | 41 + .../Meos/FloatspanWidthPhysicalFunction.hpp | 41 + .../Meos/FrontStboxStboxPhysicalFunction.hpp | 42 + .../FrontStboxTspatialPhysicalFunction.hpp | 44 + .../FrontTspatialStboxPhysicalFunction.hpp | 44 + .../FrontTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/GeoAsEwktPhysicalFunction.hpp | 42 + .../Meos/GeoAsGeojsonPhysicalFunction.hpp | 43 + .../Meos/GeoEqualsPhysicalFunction.hpp | 42 + .../Meos/GeoGeoNPhysicalFunction.hpp | 42 + .../Meos/GeoIsUnitaryPhysicalFunction.hpp | 41 + .../Meos/GeoNumGeosPhysicalFunction.hpp | 41 + .../Meos/GeoNumPointsPhysicalFunction.hpp | 41 + .../Meos/GeoPointsPhysicalFunction.hpp | 41 + .../Meos/GeoReversePhysicalFunction.hpp | 41 + .../Meos/GeoRoundPhysicalFunction.hpp | 42 + .../Meos/GeoSamePhysicalFunction.hpp | 42 + .../Meos/GeoSetSridPhysicalFunction.hpp | 42 + .../Meos/GeoSridPhysicalFunction.hpp | 41 + .../Meos/GeoTransformPhysicalFunction.hpp | 42 + .../Meos/GeogAreaPhysicalFunction.hpp | 41 + .../Meos/GeogCentroidPhysicalFunction.hpp | 42 + .../Meos/GeogDistancePhysicalFunction.hpp | 42 + .../Meos/GeogDwithinPhysicalFunction.hpp | 43 + .../Meos/GeogIntersectsPhysicalFunction.hpp | 42 + .../Meos/GeogLengthPhysicalFunction.hpp | 41 + .../Meos/GeogPerimeterPhysicalFunction.hpp | 41 + .../Meos/GeogPointMake2dPhysicalFunction.hpp | 43 + .../Meos/GeogPointMake3dzPhysicalFunction.hpp | 44 + .../Meos/GeogToGeomPhysicalFunction.hpp | 41 + .../Meos/GeomAzimuthPhysicalFunction.hpp | 41 + .../Meos/GeomBoundaryPhysicalFunction.hpp | 41 + .../Meos/GeomCentroidPhysicalFunction.hpp | 41 + .../Meos/GeomContainsPhysicalFunction.hpp | 42 + .../Meos/GeomConvexHullPhysicalFunction.hpp | 41 + .../Meos/GeomCoversPhysicalFunction.hpp | 42 + .../Meos/GeomDifference2dPhysicalFunction.hpp | 42 + .../Meos/GeomDisjoint2dPhysicalFunction.hpp | 42 + .../Meos/GeomDistance2dPhysicalFunction.hpp | 42 + .../Meos/GeomDistance3dPhysicalFunction.hpp | 42 + .../Meos/GeomDwithin2dPhysicalFunction.hpp | 43 + .../Meos/GeomDwithin3dPhysicalFunction.hpp | 43 + .../Meos/GeomDwithinPhysicalFunction.hpp | 43 + ...GeomIntersection2dCollPhysicalFunction.hpp | 42 + .../GeomIntersection2dPhysicalFunction.hpp | 42 + .../Meos/GeomIntersects2dPhysicalFunction.hpp | 42 + .../Meos/GeomIntersects3dPhysicalFunction.hpp | 42 + .../Meos/GeomIntersectsPhysicalFunction.hpp | 42 + .../Meos/GeomIsEmptyPhysicalFunction.hpp | 41 + .../Meos/GeomLengthPhysicalFunction.hpp | 41 + .../Meos/GeomPerimeterPhysicalFunction.hpp | 41 + .../Meos/GeomPointMake2dPhysicalFunction.hpp | 43 + .../Meos/GeomPointMake3dzPhysicalFunction.hpp | 44 + .../GeomShortestline2dPhysicalFunction.hpp | 42 + .../GeomShortestline3dPhysicalFunction.hpp | 42 + .../Meos/GeomToGeogPhysicalFunction.hpp | 41 + .../Meos/GeomTouchesPhysicalFunction.hpp | 42 + .../Meos/GeomUnaryUnionPhysicalFunction.hpp | 41 + .../Meos/H3indexCmpPhysicalFunction.hpp | 42 + .../Meos/H3indexEqPhysicalFunction.hpp | 42 + .../Meos/H3indexGePhysicalFunction.hpp | 42 + .../Meos/H3indexGtPhysicalFunction.hpp | 42 + .../Meos/H3indexLePhysicalFunction.hpp | 42 + .../Meos/H3indexLtPhysicalFunction.hpp | 42 + .../Meos/H3indexNePhysicalFunction.hpp | 42 + .../Meos/H3indexOutPhysicalFunction.hpp | 41 + .../Meos/IntspanLowerIncPhysicalFunction.hpp | 41 + .../Meos/IntspanLowerPhysicalFunction.hpp | 41 + .../Meos/IntspanUpperIncPhysicalFunction.hpp | 41 + .../Meos/IntspanUpperPhysicalFunction.hpp | 41 + .../Meos/IntspanWidthPhysicalFunction.hpp | 41 + .../JsonbArrayElementTextPhysicalFunction.hpp | 42 + .../Meos/JsonbArrayLengthPhysicalFunction.hpp | 41 + .../Meos/JsonbCmpPhysicalFunction.hpp | 42 + .../Meos/JsonbContainedPhysicalFunction.hpp | 42 + .../Meos/JsonbContainsPhysicalFunction.hpp | 42 + .../Meos/JsonbEqPhysicalFunction.hpp | 42 + .../Meos/JsonbExistsPhysicalFunction.hpp | 42 + .../Meos/JsonbGePhysicalFunction.hpp | 42 + .../Meos/JsonbGtPhysicalFunction.hpp | 42 + .../Meos/JsonbLePhysicalFunction.hpp | 42 + .../Meos/JsonbLtPhysicalFunction.hpp | 42 + .../Meos/JsonbNePhysicalFunction.hpp | 42 + .../JsonbObjectFieldTextPhysicalFunction.hpp | 42 + .../Meos/JsonbPrettyPhysicalFunction.hpp | 41 + .../Meos/JsonbToCstringPhysicalFunction.hpp | 41 + .../Meos/LeftStboxStboxPhysicalFunction.hpp | 42 + .../LeftStboxTspatialPhysicalFunction.hpp | 44 + .../Meos/LeftTboxTnumberPhysicalFunction.hpp | 43 + .../Meos/LeftTnumberTboxPhysicalFunction.hpp | 43 + .../LeftTnumberTnumberPhysicalFunction.hpp | 42 + .../LeftTspatialStboxPhysicalFunction.hpp | 44 + .../LeftTspatialTspatialPhysicalFunction.hpp | 46 + .../LineInterpolatePointPhysicalFunction.hpp | 42 + .../Meos/LineLocatePointPhysicalFunction.hpp | 42 + .../Meos/LineNumpointsPhysicalFunction.hpp | 41 + .../Meos/LinePointNPhysicalFunction.hpp | 42 + .../Meos/LineSubstringPhysicalFunction.hpp | 43 + ...stanceTcbufferTcbufferPhysicalFunction.hpp | 49 + .../Meos/MulBigintTbigintPhysicalFunction.hpp | 43 + .../Meos/MulFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/MulIntTintPhysicalFunction.hpp | 43 + .../Meos/MulTbigintBigintPhysicalFunction.hpp | 43 + .../Meos/MulTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/MulTintIntPhysicalFunction.hpp | 43 + .../MulTnumberTnumberPhysicalFunction.hpp | 42 + .../MultTnumberTnumberPhysicalFunction.hpp | 42 + .../Meos/NadStboxStboxPhysicalFunction.hpp | 42 + .../Meos/NadTcbufferGeoPhysicalFunction.hpp | 45 + .../Meos/NadTcbufferStboxPhysicalFunction.hpp | 45 + .../NadTcbufferTcbufferPhysicalFunction.hpp | 48 + .../Meos/NadTfloatTboxPhysicalFunction.hpp | 43 + .../Meos/NadTgeoGeoPhysicalFunction.hpp | 44 + .../Meos/NadTgeoStboxPhysicalFunction.hpp | 44 + .../Meos/NadTgeoTgeoPhysicalFunction.hpp | 46 + .../Meos/NadTintTboxPhysicalFunction.hpp | 43 + .../Meos/NadTnpointGeoPhysicalFunction.hpp | 44 + .../Meos/NadTnpointNpointPhysicalFunction.hpp | 45 + .../Meos/NadTnpointStboxPhysicalFunction.hpp | 44 + .../NadTnpointTnpointPhysicalFunction.hpp | 46 + .../Meos/NadTposeGeoPhysicalFunction.hpp | 45 + .../Meos/NadTposePosePhysicalFunction.hpp | 47 + .../Meos/NadTposeStboxPhysicalFunction.hpp | 45 + .../Meos/NadTposeTposePhysicalFunction.hpp | 48 + .../Meos/NadTrgeometryGeoPhysicalFunction.hpp | 32 + ...adTrgeometryTrgeometryPhysicalFunction.hpp | 32 + .../OveraboveStboxStboxPhysicalFunction.hpp | 42 + ...OveraboveStboxTspatialPhysicalFunction.hpp | 44 + ...OveraboveTspatialStboxPhysicalFunction.hpp | 44 + ...raboveTspatialTspatialPhysicalFunction.hpp | 46 + .../OverafterStboxStboxPhysicalFunction.hpp | 42 + ...OverafterStboxTspatialPhysicalFunction.hpp | 44 + .../OverafterTboxTnumberPhysicalFunction.hpp | 43 + ...rafterTemporalTemporalPhysicalFunction.hpp | 46 + .../OverafterTnumberTboxPhysicalFunction.hpp | 43 + ...verafterTnumberTnumberPhysicalFunction.hpp | 42 + ...OverafterTspatialStboxPhysicalFunction.hpp | 44 + ...rafterTspatialTspatialPhysicalFunction.hpp | 46 + .../OverbackStboxStboxPhysicalFunction.hpp | 42 + .../OverbackStboxTspatialPhysicalFunction.hpp | 44 + .../OverbackTspatialStboxPhysicalFunction.hpp | 44 + ...erbackTspatialTspatialPhysicalFunction.hpp | 46 + .../OverbeforeStboxStboxPhysicalFunction.hpp | 42 + ...verbeforeStboxTspatialPhysicalFunction.hpp | 44 + .../OverbeforeTboxTnumberPhysicalFunction.hpp | 43 + ...beforeTemporalTemporalPhysicalFunction.hpp | 46 + .../OverbeforeTnumberTboxPhysicalFunction.hpp | 43 + ...erbeforeTnumberTnumberPhysicalFunction.hpp | 42 + ...verbeforeTspatialStboxPhysicalFunction.hpp | 44 + ...beforeTspatialTspatialPhysicalFunction.hpp | 46 + .../OverbelowStboxStboxPhysicalFunction.hpp | 42 + ...OverbelowStboxTspatialPhysicalFunction.hpp | 44 + ...OverbelowTspatialStboxPhysicalFunction.hpp | 44 + ...rbelowTspatialTspatialPhysicalFunction.hpp | 46 + .../OverfrontStboxStboxPhysicalFunction.hpp | 42 + ...OverfrontStboxTspatialPhysicalFunction.hpp | 44 + ...OverfrontTspatialStboxPhysicalFunction.hpp | 44 + ...rfrontTspatialTspatialPhysicalFunction.hpp | 46 + .../OverlapsStboxStboxPhysicalFunction.hpp | 42 + .../OverlapsStboxTspatialPhysicalFunction.hpp | 44 + .../OverlapsTboxTnumberPhysicalFunction.hpp | 43 + ...erlapsTemporalTemporalPhysicalFunction.hpp | 46 + .../OverlapsTnumberTboxPhysicalFunction.hpp | 43 + ...OverlapsTnumberTnumberPhysicalFunction.hpp | 42 + .../OverlapsTspatialStboxPhysicalFunction.hpp | 44 + ...erlapsTspatialTspatialPhysicalFunction.hpp | 46 + .../OverleftStboxStboxPhysicalFunction.hpp | 42 + .../OverleftStboxTspatialPhysicalFunction.hpp | 44 + .../OverleftTboxTnumberPhysicalFunction.hpp | 43 + .../OverleftTnumberTboxPhysicalFunction.hpp | 43 + ...OverleftTnumberTnumberPhysicalFunction.hpp | 42 + .../OverleftTspatialStboxPhysicalFunction.hpp | 44 + ...erleftTspatialTspatialPhysicalFunction.hpp | 46 + .../OverrightStboxStboxPhysicalFunction.hpp | 42 + ...OverrightStboxTspatialPhysicalFunction.hpp | 44 + .../OverrightTboxTnumberPhysicalFunction.hpp | 43 + .../OverrightTnumberTboxPhysicalFunction.hpp | 43 + ...verrightTnumberTnumberPhysicalFunction.hpp | 42 + ...OverrightTspatialStboxPhysicalFunction.hpp | 44 + ...rrightTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/QuadbinCellAreaPhysicalFunction.hpp | 41 + .../QuadbinCellToParentPhysicalFunction.hpp | 42 + .../QuadbinCellToQuadkeyPhysicalFunction.hpp | 41 + .../Meos/QuadbinCmpPhysicalFunction.hpp | 42 + .../Meos/QuadbinEqPhysicalFunction.hpp | 42 + .../Meos/QuadbinGePhysicalFunction.hpp | 42 + .../QuadbinGetResolutionPhysicalFunction.hpp | 41 + .../Meos/QuadbinGtPhysicalFunction.hpp | 42 + .../QuadbinIsValidCellPhysicalFunction.hpp | 41 + .../Meos/QuadbinLePhysicalFunction.hpp | 42 + .../Meos/QuadbinLtPhysicalFunction.hpp | 42 + .../Meos/QuadbinNePhysicalFunction.hpp | 42 + .../QuadbinPointToCellPhysicalFunction.hpp | 43 + .../QuadbinTileToCellPhysicalFunction.hpp | 43 + .../Meos/RightStboxStboxPhysicalFunction.hpp | 42 + .../RightStboxTspatialPhysicalFunction.hpp | 44 + .../Meos/RightTboxTnumberPhysicalFunction.hpp | 43 + .../Meos/RightTnumberTboxPhysicalFunction.hpp | 43 + .../RightTnumberTnumberPhysicalFunction.hpp | 42 + .../RightTspatialStboxPhysicalFunction.hpp | 44 + .../RightTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/SameStboxStboxPhysicalFunction.hpp | 42 + .../SameStboxTspatialPhysicalFunction.hpp | 44 + .../Meos/SameTboxTnumberPhysicalFunction.hpp | 43 + .../SameTemporalTemporalPhysicalFunction.hpp | 46 + .../Meos/SameTnumberTboxPhysicalFunction.hpp | 43 + .../SameTnumberTnumberPhysicalFunction.hpp | 42 + .../SameTspatialStboxPhysicalFunction.hpp | 44 + .../SameTspatialTspatialPhysicalFunction.hpp | 46 + .../Meos/StboxCmpPhysicalFunction.hpp | 42 + .../Meos/StboxEqPhysicalFunction.hpp | 42 + .../Meos/StboxGePhysicalFunction.hpp | 42 + .../Meos/StboxGtPhysicalFunction.hpp | 42 + .../Meos/StboxLePhysicalFunction.hpp | 42 + .../Meos/StboxLtPhysicalFunction.hpp | 42 + .../Meos/StboxNePhysicalFunction.hpp | 42 + .../Meos/SubBigintTbigintPhysicalFunction.hpp | 43 + .../Meos/SubFloatTfloatPhysicalFunction.hpp | 43 + .../Meos/SubIntTintPhysicalFunction.hpp | 43 + .../Meos/SubTbigintBigintPhysicalFunction.hpp | 43 + .../Meos/SubTfloatFloatPhysicalFunction.hpp | 43 + .../Meos/SubTintIntPhysicalFunction.hpp | 43 + .../SubTnumberTnumberPhysicalFunction.hpp | 42 + .../Meos/TEqTextTtextPhysicalFunction.hpp | 43 + .../Meos/TEqTtextTextPhysicalFunction.hpp | 43 + .../Meos/TGeTextTtextPhysicalFunction.hpp | 43 + .../Meos/TGeTtextTextPhysicalFunction.hpp | 43 + .../Meos/TGtTextTtextPhysicalFunction.hpp | 43 + .../Meos/TGtTtextTextPhysicalFunction.hpp | 43 + .../Meos/TLeTextTtextPhysicalFunction.hpp | 43 + .../Meos/TLeTtextTextPhysicalFunction.hpp | 43 + .../Meos/TLtTextTtextPhysicalFunction.hpp | 43 + .../Meos/TLtTtextTextPhysicalFunction.hpp | 43 + .../Meos/TNeTextTtextPhysicalFunction.hpp | 43 + .../Meos/TNeTtextTextPhysicalFunction.hpp | 43 + .../Meos/TandBoolTboolPhysicalFunction.hpp | 43 + .../Meos/TandTboolBoolPhysicalFunction.hpp | 43 + .../Meos/TandTboolTboolPhysicalFunction.hpp | 42 + .../TbigintScaleValuePhysicalFunction.hpp | 43 + ...TbigintShiftScaleValuePhysicalFunction.hpp | 44 + .../TbigintShiftValuePhysicalFunction.hpp | 43 + .../Meos/TbigintToTfloatPhysicalFunction.hpp | 42 + .../Meos/TbigintToTintPhysicalFunction.hpp | 42 + .../Meos/TboolEndValuePhysicalFunction.hpp | 42 + .../Meos/TboolStartValuePhysicalFunction.hpp | 42 + .../Meos/TboolToTintPhysicalFunction.hpp | 42 + .../Meos/TcbufferToTfloatPhysicalFunction.hpp | 44 + ...ntainsTcbufferTcbufferPhysicalFunction.hpp | 42 + .../TcontainsTgeoTgeoPhysicalFunction.hpp | 42 + ...coversTcbufferTcbufferPhysicalFunction.hpp | 42 + .../Meos/TcoversTgeoTgeoPhysicalFunction.hpp | 42 + ...stanceTcbufferTcbufferPhysicalFunction.hpp | 42 + .../TdistanceTfloatFloatPhysicalFunction.hpp | 43 + .../TdistanceTgeoTgeoPhysicalFunction.hpp | 42 + .../Meos/TdistanceTintIntPhysicalFunction.hpp | 43 + ...distanceTnpointTnpointPhysicalFunction.hpp | 42 + ...distanceTnumberTnumberPhysicalFunction.hpp | 42 + .../TdistanceTposeTposePhysicalFunction.hpp | 42 + ...poralAContainsGeometryPhysicalFunction.hpp | 44 + ...ontainsTCbufferCbufferPhysicalFunction.hpp | 45 + ...poralAContainsTCbufferPhysicalFunction.hpp | 45 + ...oralAContainsTGeometryPhysicalFunction.hpp | 46 + ...ontainsTNpointGeometryPhysicalFunction.hpp | 44 + ...ContainsTNpointTNpointPhysicalFunction.hpp | 46 + ...AContainsTPoseGeometryPhysicalFunction.hpp | 45 + ...ralAContainsTPoseTPosePhysicalFunction.hpp | 48 + ...ACoversTCbufferCbufferPhysicalFunction.hpp | 45 + ...emporalACoversTCbufferPhysicalFunction.hpp | 45 + ...mporalADWithinGeometryPhysicalFunction.hpp | 45 + ...DWithinTCbufferCbufferPhysicalFunction.hpp | 46 + ...WithinTCbufferGeometryPhysicalFunction.hpp | 46 + ...WithinTCbufferTCbufferPhysicalFunction.hpp | 49 + ...poralADWithinTGeometryPhysicalFunction.hpp | 47 + ...DWithinTNpointGeometryPhysicalFunction.hpp | 45 + ...ADWithinTNpointTNpointPhysicalFunction.hpp | 47 + ...lADWithinTPoseGeometryPhysicalFunction.hpp | 46 + ...oralADWithinTPoseTPosePhysicalFunction.hpp | 49 + ...poralADisjointGeometryPhysicalFunction.hpp | 44 + ...isjointTCbufferCbufferPhysicalFunction.hpp | 45 + ...poralADisjointTCbufferPhysicalFunction.hpp | 45 + ...sjointTCbufferTCbufferPhysicalFunction.hpp | 48 + ...oralADisjointTGeometryPhysicalFunction.hpp | 46 + ...isjointTNpointGeometryPhysicalFunction.hpp | 44 + ...DisjointTNpointTNpointPhysicalFunction.hpp | 46 + ...ADisjointTPoseGeometryPhysicalFunction.hpp | 45 + ...ralADisjointTPoseTPosePhysicalFunction.hpp | 48 + ...ralAIntersectsGeometryPhysicalFunction.hpp | 41 +- ...ersectsTCbufferCbufferPhysicalFunction.hpp | 45 + ...ralAIntersectsTCbufferPhysicalFunction.hpp | 45 + ...rsectsTCbufferTCbufferPhysicalFunction.hpp | 48 + ...alAIntersectsTGeometryPhysicalFunction.hpp | 46 + ...ersectsTNpointGeometryPhysicalFunction.hpp | 44 + ...tersectsTNpointTNpointPhysicalFunction.hpp | 46 + ...ntersectsTPoseGeometryPhysicalFunction.hpp | 45 + ...lAIntersectsTPoseTPosePhysicalFunction.hpp | 48 + ...mporalATouchesGeometryPhysicalFunction.hpp | 44 + ...TouchesTCbufferCbufferPhysicalFunction.hpp | 45 + ...mporalATouchesTCbufferPhysicalFunction.hpp | 45 + ...ouchesTCbufferTCbufferPhysicalFunction.hpp | 48 + ...poralATouchesTGeometryPhysicalFunction.hpp | 46 + ...TouchesTNpointGeometryPhysicalFunction.hpp | 44 + ...ATouchesTNpointTNpointPhysicalFunction.hpp | 46 + ...lATouchesTPoseGeometryPhysicalFunction.hpp | 45 + ...oralATouchesTPoseTPosePhysicalFunction.hpp | 48 + .../TemporalAtGeometryPhysicalFunction.hpp | 44 + .../Meos/TemporalAtStBoxPhysicalFunction.hpp | 37 +- .../Meos/TemporalCmpPhysicalFunction.hpp | 46 + ...ralDyntimewarpDistancePhysicalFunction.hpp | 46 + ...poralEContainsGeometryPhysicalFunction.hpp | 52 +- ...ontainsTCbufferCbufferPhysicalFunction.hpp | 45 + ...poralEContainsTCbufferPhysicalFunction.hpp | 45 + ...oralEContainsTGeometryPhysicalFunction.hpp | 46 + ...ontainsTNpointGeometryPhysicalFunction.hpp | 44 + ...ContainsTNpointTNpointPhysicalFunction.hpp | 46 + ...EContainsTPoseGeometryPhysicalFunction.hpp | 45 + ...ralEContainsTPoseTPosePhysicalFunction.hpp | 48 + ...emporalECoversGeometryPhysicalFunction.hpp | 44 + ...ECoversTCbufferCbufferPhysicalFunction.hpp | 45 + ...emporalECoversTCbufferPhysicalFunction.hpp | 45 + ...CoversTCbufferTCbufferPhysicalFunction.hpp | 48 + ...mporalECoversTGeometryPhysicalFunction.hpp | 46 + ...ECoversTNpointGeometryPhysicalFunction.hpp | 44 + ...lECoversTNpointTNpointPhysicalFunction.hpp | 46 + ...alECoversTPoseGeometryPhysicalFunction.hpp | 45 + ...poralECoversTPoseTPosePhysicalFunction.hpp | 48 + ...mporalEDWithinGeometryPhysicalFunction.hpp | 32 +- ...DWithinTCbufferCbufferPhysicalFunction.hpp | 46 + ...WithinTCbufferGeometryPhysicalFunction.hpp | 46 + ...WithinTCbufferTCbufferPhysicalFunction.hpp | 49 + ...poralEDWithinTGeometryPhysicalFunction.hpp | 47 + ...DWithinTNpointGeometryPhysicalFunction.hpp | 45 + ...EDWithinTNpointTNpointPhysicalFunction.hpp | 47 + ...lEDWithinTPoseGeometryPhysicalFunction.hpp | 46 + ...oralEDWithinTPoseTPosePhysicalFunction.hpp | 49 + ...poralEDisjointGeometryPhysicalFunction.hpp | 44 + ...isjointTCbufferCbufferPhysicalFunction.hpp | 45 + ...poralEDisjointTCbufferPhysicalFunction.hpp | 45 + ...oralEDisjointTGeometryPhysicalFunction.hpp | 46 + ...isjointTNpointGeometryPhysicalFunction.hpp | 44 + ...DisjointTNpointTNpointPhysicalFunction.hpp | 46 + ...EDisjointTPoseGeometryPhysicalFunction.hpp | 45 + ...ralEDisjointTPoseTPosePhysicalFunction.hpp | 48 + ...ralEIntersectsGeometryPhysicalFunction.hpp | 44 + ...ersectsTCbufferCbufferPhysicalFunction.hpp | 45 + ...ralEIntersectsTCbufferPhysicalFunction.hpp | 45 + ...rsectsTCbufferTCbufferPhysicalFunction.hpp | 48 + ...alEIntersectsTGeometryPhysicalFunction.hpp | 46 + ...ersectsTNpointGeometryPhysicalFunction.hpp | 44 + ...tersectsTNpointTNpointPhysicalFunction.hpp | 46 + ...ntersectsTPoseGeometryPhysicalFunction.hpp | 45 + ...lEIntersectsTPoseTPosePhysicalFunction.hpp | 48 + ...mporalETouchesGeometryPhysicalFunction.hpp | 44 + ...TouchesTCbufferCbufferPhysicalFunction.hpp | 45 + ...mporalETouchesTCbufferPhysicalFunction.hpp | 45 + ...ouchesTCbufferTCbufferPhysicalFunction.hpp | 48 + ...poralETouchesTGeometryPhysicalFunction.hpp | 46 + ...TouchesTNpointGeometryPhysicalFunction.hpp | 44 + ...ETouchesTNpointTNpointPhysicalFunction.hpp | 46 + ...lETouchesTPoseGeometryPhysicalFunction.hpp | 45 + ...oralETouchesTPoseTPosePhysicalFunction.hpp | 48 + .../Meos/TemporalEqPhysicalFunction.hpp | 46 + ...emporalFrechetDistancePhysicalFunction.hpp | 46 + .../Meos/TemporalGePhysicalFunction.hpp | 46 + .../Meos/TemporalGtPhysicalFunction.hpp | 46 + ...poralHausdorffDistancePhysicalFunction.hpp | 46 + ...oralIntersectsGeometryPhysicalFunction.hpp | 40 +- .../Meos/TemporalLePhysicalFunction.hpp | 46 + .../Meos/TemporalLtPhysicalFunction.hpp | 46 + .../TemporalMinusGeometryPhysicalFunction.hpp | 44 + ...TemporalNADFloatScalarPhysicalFunction.hpp | 43 + .../TemporalNADGeometryPhysicalFunction.hpp | 46 + .../TemporalNADIntScalarPhysicalFunction.hpp | 43 + ...oralNADTCbufferCbufferPhysicalFunction.hpp | 45 + .../TemporalNADTCbufferPhysicalFunction.hpp | 45 + ...ralNADTCbufferTCbufferPhysicalFunction.hpp | 48 + .../TemporalNADTFloatPhysicalFunction.hpp | 44 + .../TemporalNADTGeometryPhysicalFunction.hpp | 46 + .../Meos/TemporalNADTIntPhysicalFunction.hpp | 44 + ...oralNADTNpointGeometryPhysicalFunction.hpp | 44 + ...poralNADTNpointTNpointPhysicalFunction.hpp | 46 + ...mporalNADTPoseGeometryPhysicalFunction.hpp | 45 + .../TemporalNADTPoseTPosePhysicalFunction.hpp | 48 + .../Meos/TemporalNePhysicalFunction.hpp | 46 + .../Meos/TemporalRoundPhysicalFunction.hpp | 43 + .../Meos/TeqBoolTboolPhysicalFunction.hpp | 43 + .../Meos/TeqTboolBoolPhysicalFunction.hpp | 43 + .../Meos/TextInitcapPhysicalFunction.hpp | 41 + .../Meos/TextLowerPhysicalFunction.hpp | 41 + .../Meos/TextUpperPhysicalFunction.hpp | 41 + .../Meos/TextcatTextTtextPhysicalFunction.hpp | 43 + .../Meos/TextcatTtextTextPhysicalFunction.hpp | 43 + .../TextcatTtextTtextPhysicalFunction.hpp | 44 + .../Meos/TfloatCeilPhysicalFunction.hpp | 42 + .../Meos/TfloatExpPhysicalFunction.hpp | 42 + .../Meos/TfloatFloorPhysicalFunction.hpp | 42 + .../Meos/TfloatLnPhysicalFunction.hpp | 42 + .../Meos/TfloatLog10PhysicalFunction.hpp | 42 + .../Meos/TfloatRadiansPhysicalFunction.hpp | 42 + .../Meos/TfloatScaleValuePhysicalFunction.hpp | 43 + .../TfloatShiftScaleValuePhysicalFunction.hpp | 44 + .../Meos/TfloatShiftValuePhysicalFunction.hpp | 43 + .../Meos/TfloatToTbigintPhysicalFunction.hpp | 42 + .../Meos/TfloatToTintPhysicalFunction.hpp | 42 + ...3indexAreNeighborCellsPhysicalFunction.hpp | 44 + ...xCellToCenterChildNextPhysicalFunction.hpp | 43 + ...indexCellToCenterChildPhysicalFunction.hpp | 43 + ...Th3indexCellToChildPosPhysicalFunction.hpp | 43 + ...3indexCellToParentNextPhysicalFunction.hpp | 43 + .../Th3indexCellToParentPhysicalFunction.hpp | 43 + ...indexGetBaseCellNumberPhysicalFunction.hpp | 42 + .../Th3indexGetResolutionPhysicalFunction.hpp | 42 + .../Th3indexGridDistancePhysicalFunction.hpp | 44 + .../Th3indexIsPentagonPhysicalFunction.hpp | 42 + .../Th3indexIsValidCellPhysicalFunction.hpp | 42 + .../Meos/TintScaleValuePhysicalFunction.hpp | 43 + .../TintShiftScaleValuePhysicalFunction.hpp | 44 + .../Meos/TintShiftValuePhysicalFunction.hpp | 43 + .../Meos/TintToTbigintPhysicalFunction.hpp | 42 + .../Meos/TintToTfloatPhysicalFunction.hpp | 42 + .../Meos/TneBoolTboolPhysicalFunction.hpp | 43 + .../Meos/TneTboolBoolPhysicalFunction.hpp | 43 + .../Meos/TnotTboolPhysicalFunction.hpp | 42 + .../Meos/TnpointLengthPhysicalFunction.hpp | 43 + .../Meos/TorBoolTboolPhysicalFunction.hpp | 43 + .../Meos/TorTboolBoolPhysicalFunction.hpp | 43 + .../Meos/TorTboolTboolPhysicalFunction.hpp | 42 + .../Meos/TpointLengthWkbPhysicalFunction.hpp | 41 + .../Meos/TtextInitcapPhysicalFunction.hpp | 42 + .../Meos/TtextLowerPhysicalFunction.hpp | 42 + .../Meos/TtextUpperPhysicalFunction.hpp | 42 + .../Meos/AboveStboxStboxPhysicalFunction.cpp | 100 + .../AboveStboxTspatialPhysicalFunction.cpp | 109 + .../AboveTspatialStboxPhysicalFunction.cpp | 109 + .../AboveTspatialTspatialPhysicalFunction.cpp | 117 + ...AcontainsGeoTrgeometryPhysicalFunction.cpp | 97 + .../AcontainsTcbufferGeoPhysicalFunction.cpp | 125 + ...ntainsTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/AcontainsTgeoGeoPhysicalFunction.cpp | 124 + .../AcontainsTgeoTgeoPhysicalFunction.cpp | 117 + .../AcoversGeoTrgeometryPhysicalFunction.cpp | 97 + .../AcoversTcbufferGeoPhysicalFunction.cpp | 125 + ...coversTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/AcoversTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/AcoversTgeoTgeoPhysicalFunction.cpp | 117 + .../AcoversTrgeometryGeoPhysicalFunction.cpp | 97 + .../Meos/AddBigintTbigintPhysicalFunction.cpp | 101 + .../Meos/AddFloatTfloatPhysicalFunction.cpp | 101 + .../Meos/AddIntTintPhysicalFunction.cpp | 101 + .../Meos/AddTbigintBigintPhysicalFunction.cpp | 101 + .../Meos/AddTfloatFloatPhysicalFunction.cpp | 101 + .../Meos/AddTintIntPhysicalFunction.cpp | 101 + .../AddTnumberTnumberPhysicalFunction.cpp | 122 + .../AdisjointTcbufferGeoPhysicalFunction.cpp | 125 + ...sjointTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/AdisjointTgeoGeoPhysicalFunction.cpp | 124 + .../AdisjointTgeoTgeoPhysicalFunction.cpp | 117 + ...AdisjointTrgeometryGeoPhysicalFunction.cpp | 97 + ...ntTrgeometryTrgeometryPhysicalFunction.cpp | 114 + .../AdjacentStboxStboxPhysicalFunction.cpp | 100 + .../AdjacentStboxTspatialPhysicalFunction.cpp | 109 + .../AdjacentTboxTnumberPhysicalFunction.cpp | 103 + ...jacentTemporalTemporalPhysicalFunction.cpp | 117 + .../AdjacentTnumberTboxPhysicalFunction.cpp | 103 + ...AdjacentTnumberTnumberPhysicalFunction.cpp | 96 + .../AdjacentTspatialStboxPhysicalFunction.cpp | 109 + ...jacentTspatialTspatialPhysicalFunction.cpp | 117 + ...dwithinTcbufferCbufferPhysicalFunction.cpp | 126 + .../AdwithinTcbufferGeoPhysicalFunction.cpp | 125 + ...withinTcbufferTcbufferPhysicalFunction.cpp | 132 + .../Meos/AdwithinTgeoGeoPhysicalFunction.cpp | 125 + .../Meos/AdwithinTgeoTgeoPhysicalFunction.cpp | 124 + .../AdwithinTrgeometryGeoPhysicalFunction.cpp | 100 + ...inTrgeometryTrgeometryPhysicalFunction.cpp | 117 + .../Meos/AfterStboxStboxPhysicalFunction.cpp | 100 + .../AfterStboxTspatialPhysicalFunction.cpp | 109 + .../Meos/AfterTboxTnumberPhysicalFunction.cpp | 103 + .../AfterTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/AfterTnumberTboxPhysicalFunction.cpp | 103 + .../AfterTnumberTnumberPhysicalFunction.cpp | 96 + .../AfterTspatialStboxPhysicalFunction.cpp | 109 + .../AfterTspatialTspatialPhysicalFunction.cpp | 117 + ...AintersectsTcbufferGeoPhysicalFunction.cpp | 125 + ...rsectsTcbufferTcbufferPhysicalFunction.cpp | 127 + .../AintersectsTgeoGeoPhysicalFunction.cpp | 124 + .../AintersectsTgeoTgeoPhysicalFunction.cpp | 117 + ...ntersectsTrgeometryGeoPhysicalFunction.cpp | 97 + ...tsTrgeometryTrgeometryPhysicalFunction.cpp | 114 + .../AlwaysEqBigintTbigintPhysicalFunction.cpp | 98 + .../AlwaysEqBoolTboolPhysicalFunction.cpp | 98 + .../AlwaysEqFloatTfloatPhysicalFunction.cpp | 89 + .../AlwaysEqGeoTrgeometryPhysicalFunction.cpp | 98 + .../Meos/AlwaysEqIntTintPhysicalFunction.cpp | 89 + .../AlwaysEqNpointTnpointPhysicalFunction.cpp | 112 + .../AlwaysEqPoseTposePhysicalFunction.cpp | 121 + .../AlwaysEqTbigintBigintPhysicalFunction.cpp | 98 + .../AlwaysEqTboolBoolPhysicalFunction.cpp | 98 + ...lwaysEqTcbufferCbufferPhysicalFunction.cpp | 126 + ...waysEqTcbufferTcbufferPhysicalFunction.cpp | 127 + ...waysEqTemporalTemporalPhysicalFunction.cpp | 117 + .../AlwaysEqTextTtextPhysicalFunction.cpp | 106 + .../AlwaysEqTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/AlwaysEqTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/AlwaysEqTgeoTgeoPhysicalFunction.cpp | 117 + ...lwaysEqTh3indexH3indexPhysicalFunction.cpp | 97 + .../Meos/AlwaysEqTintIntPhysicalFunction.cpp | 88 + .../AlwaysEqTjsonbJsonbPhysicalFunction.cpp | 105 + .../AlwaysEqTjsonbTjsonbPhysicalFunction.cpp | 113 + .../AlwaysEqTnpointNpointPhysicalFunction.cpp | 112 + ...AlwaysEqTnpointTnpointPhysicalFunction.cpp | 120 + .../AlwaysEqTposePosePhysicalFunction.cpp | 121 + .../AlwaysEqTposeTposePhysicalFunction.cpp | 129 + ...lwaysEqTquadbinQuadbinPhysicalFunction.cpp | 97 + .../AlwaysEqTrgeometryGeoPhysicalFunction.cpp | 98 + ...EqTrgeometryTrgeometryPhysicalFunction.cpp | 115 + .../AlwaysEqTtextTextPhysicalFunction.cpp | 106 + .../AlwaysGeBigintTbigintPhysicalFunction.cpp | 98 + .../AlwaysGeFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/AlwaysGeIntTintPhysicalFunction.cpp | 89 + .../AlwaysGeTbigintBigintPhysicalFunction.cpp | 98 + ...waysGeTemporalTemporalPhysicalFunction.cpp | 117 + .../AlwaysGeTextTtextPhysicalFunction.cpp | 106 + .../AlwaysGeTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/AlwaysGeTintIntPhysicalFunction.cpp | 88 + .../AlwaysGeTtextTextPhysicalFunction.cpp | 106 + .../AlwaysGtBigintTbigintPhysicalFunction.cpp | 98 + .../AlwaysGtFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/AlwaysGtIntTintPhysicalFunction.cpp | 89 + .../AlwaysGtTbigintBigintPhysicalFunction.cpp | 98 + ...waysGtTemporalTemporalPhysicalFunction.cpp | 117 + .../AlwaysGtTextTtextPhysicalFunction.cpp | 106 + .../AlwaysGtTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/AlwaysGtTintIntPhysicalFunction.cpp | 88 + .../AlwaysGtTtextTextPhysicalFunction.cpp | 106 + .../AlwaysLeBigintTbigintPhysicalFunction.cpp | 98 + .../AlwaysLeFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/AlwaysLeIntTintPhysicalFunction.cpp | 89 + .../AlwaysLeTbigintBigintPhysicalFunction.cpp | 98 + ...waysLeTemporalTemporalPhysicalFunction.cpp | 117 + .../AlwaysLeTextTtextPhysicalFunction.cpp | 106 + .../AlwaysLeTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/AlwaysLeTintIntPhysicalFunction.cpp | 88 + .../AlwaysLeTtextTextPhysicalFunction.cpp | 106 + .../AlwaysLtBigintTbigintPhysicalFunction.cpp | 98 + .../AlwaysLtFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/AlwaysLtIntTintPhysicalFunction.cpp | 89 + .../AlwaysLtTbigintBigintPhysicalFunction.cpp | 98 + ...waysLtTemporalTemporalPhysicalFunction.cpp | 117 + .../AlwaysLtTextTtextPhysicalFunction.cpp | 106 + .../AlwaysLtTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/AlwaysLtTintIntPhysicalFunction.cpp | 88 + .../AlwaysLtTtextTextPhysicalFunction.cpp | 106 + .../AlwaysNeBigintTbigintPhysicalFunction.cpp | 98 + .../AlwaysNeBoolTboolPhysicalFunction.cpp | 98 + .../AlwaysNeFloatTfloatPhysicalFunction.cpp | 89 + .../AlwaysNeGeoTrgeometryPhysicalFunction.cpp | 98 + .../Meos/AlwaysNeIntTintPhysicalFunction.cpp | 89 + .../AlwaysNeNpointTnpointPhysicalFunction.cpp | 112 + .../AlwaysNePoseTposePhysicalFunction.cpp | 121 + .../AlwaysNeTbigintBigintPhysicalFunction.cpp | 98 + .../AlwaysNeTboolBoolPhysicalFunction.cpp | 98 + ...lwaysNeTcbufferCbufferPhysicalFunction.cpp | 126 + ...waysNeTcbufferTcbufferPhysicalFunction.cpp | 127 + ...waysNeTemporalTemporalPhysicalFunction.cpp | 117 + .../AlwaysNeTextTtextPhysicalFunction.cpp | 106 + .../AlwaysNeTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/AlwaysNeTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/AlwaysNeTgeoTgeoPhysicalFunction.cpp | 117 + ...lwaysNeTh3indexH3indexPhysicalFunction.cpp | 97 + .../Meos/AlwaysNeTintIntPhysicalFunction.cpp | 88 + .../AlwaysNeTjsonbJsonbPhysicalFunction.cpp | 105 + .../AlwaysNeTjsonbTjsonbPhysicalFunction.cpp | 113 + .../AlwaysNeTnpointNpointPhysicalFunction.cpp | 112 + ...AlwaysNeTnpointTnpointPhysicalFunction.cpp | 120 + .../AlwaysNeTposePosePhysicalFunction.cpp | 121 + .../AlwaysNeTposeTposePhysicalFunction.cpp | 129 + ...lwaysNeTquadbinQuadbinPhysicalFunction.cpp | 97 + .../AlwaysNeTrgeometryGeoPhysicalFunction.cpp | 98 + ...NeTrgeometryTrgeometryPhysicalFunction.cpp | 115 + .../AlwaysNeTtextTextPhysicalFunction.cpp | 106 + .../AtouchesTcbufferGeoPhysicalFunction.cpp | 125 + ...ouchesTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/AtouchesTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/AtouchesTgeoTgeoPhysicalFunction.cpp | 117 + .../AtouchesTpointGeoPhysicalFunction.cpp | 124 + .../AtouchesTrgeometryGeoPhysicalFunction.cpp | 97 + .../Meos/BackStboxStboxPhysicalFunction.cpp | 100 + .../BackStboxTspatialPhysicalFunction.cpp | 109 + .../BackTspatialStboxPhysicalFunction.cpp | 109 + .../BackTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/BeforeStboxStboxPhysicalFunction.cpp | 100 + .../BeforeStboxTspatialPhysicalFunction.cpp | 109 + .../BeforeTboxTnumberPhysicalFunction.cpp | 103 + ...BeforeTemporalTemporalPhysicalFunction.cpp | 117 + .../BeforeTnumberTboxPhysicalFunction.cpp | 103 + .../BeforeTnumberTnumberPhysicalFunction.cpp | 96 + .../BeforeTspatialStboxPhysicalFunction.cpp | 109 + ...BeforeTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/BelowStboxStboxPhysicalFunction.cpp | 100 + .../BelowStboxTspatialPhysicalFunction.cpp | 109 + .../BelowTspatialStboxPhysicalFunction.cpp | 109 + .../BelowTspatialTspatialPhysicalFunction.cpp | 117 + .../src/Functions/Meos/CMakeLists.txt | 765 + .../ContainedFloatSpanPhysicalFunction.cpp | 92 + ...ContainedFloatspanSpanPhysicalFunction.cpp | 98 + .../Meos/ContainedIntSpanPhysicalFunction.cpp | 92 + .../ContainedSpanSpanPhysicalFunction.cpp | 98 + .../ContainedStboxStboxPhysicalFunction.cpp | 100 + ...ContainedStboxTspatialPhysicalFunction.cpp | 109 + .../ContainedTboxTnumberPhysicalFunction.cpp | 103 + ...tainedTemporalTemporalPhysicalFunction.cpp | 117 + .../ContainedTnumberTboxPhysicalFunction.cpp | 103 + ...ontainedTnumberTnumberPhysicalFunction.cpp | 96 + ...ContainedTspatialStboxPhysicalFunction.cpp | 109 + ...tainedTspatialTspatialPhysicalFunction.cpp | 117 + .../ContainsFloatspanSpanPhysicalFunction.cpp | 98 + .../ContainsSpanFloatPhysicalFunction.cpp | 92 + .../Meos/ContainsSpanIntPhysicalFunction.cpp | 92 + .../Meos/ContainsSpanSpanPhysicalFunction.cpp | 98 + .../ContainsStboxStboxPhysicalFunction.cpp | 100 + .../ContainsStboxTspatialPhysicalFunction.cpp | 109 + .../ContainsTboxTnumberPhysicalFunction.cpp | 103 + ...ntainsTemporalTemporalPhysicalFunction.cpp | 117 + .../ContainsTnumberTboxPhysicalFunction.cpp | 103 + ...ContainsTnumberTnumberPhysicalFunction.cpp | 96 + .../ContainsTspatialStboxPhysicalFunction.cpp | 109 + ...ntainsTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/DivBigintTbigintPhysicalFunction.cpp | 101 + .../Meos/DivFloatTfloatPhysicalFunction.cpp | 101 + .../Meos/DivIntTintPhysicalFunction.cpp | 101 + .../Meos/DivTbigintBigintPhysicalFunction.cpp | 101 + .../Meos/DivTfloatFloatPhysicalFunction.cpp | 101 + .../Meos/DivTintIntPhysicalFunction.cpp | 101 + .../DivTnumberTnumberPhysicalFunction.cpp | 122 + ...EcontainsGeoTrgeometryPhysicalFunction.cpp | 97 + .../EcontainsTcbufferGeoPhysicalFunction.cpp | 125 + ...ntainsTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/EcontainsTgeoGeoPhysicalFunction.cpp | 124 + .../EcontainsTgeoTgeoPhysicalFunction.cpp | 117 + .../EcoversGeoTrgeometryPhysicalFunction.cpp | 97 + .../EcoversTcbufferGeoPhysicalFunction.cpp | 125 + ...coversTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/EcoversTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/EcoversTgeoTgeoPhysicalFunction.cpp | 117 + .../EcoversTrgeometryGeoPhysicalFunction.cpp | 97 + .../EdisjointTcbufferGeoPhysicalFunction.cpp | 125 + ...sjointTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/EdisjointTgeoGeoPhysicalFunction.cpp | 124 + .../EdisjointTgeoTgeoPhysicalFunction.cpp | 117 + ...EdisjointTrgeometryGeoPhysicalFunction.cpp | 97 + ...ntTrgeometryTrgeometryPhysicalFunction.cpp | 114 + ...dwithinTcbufferCbufferPhysicalFunction.cpp | 126 + .../EdwithinTcbufferGeoPhysicalFunction.cpp | 125 + ...withinTcbufferTcbufferPhysicalFunction.cpp | 132 + .../Meos/EdwithinTgeoGeoPhysicalFunction.cpp | 125 + .../Meos/EdwithinTgeoTgeoPhysicalFunction.cpp | 124 + .../EdwithinTrgeometryGeoPhysicalFunction.cpp | 100 + ...inTrgeometryTrgeometryPhysicalFunction.cpp | 117 + ...EintersectsTcbufferGeoPhysicalFunction.cpp | 125 + ...rsectsTcbufferTcbufferPhysicalFunction.cpp | 127 + .../EintersectsTgeoGeoPhysicalFunction.cpp | 124 + .../EintersectsTgeoTgeoPhysicalFunction.cpp | 117 + ...ntersectsTrgeometryGeoPhysicalFunction.cpp | 97 + ...tsTrgeometryTrgeometryPhysicalFunction.cpp | 114 + .../EtouchesTcbufferGeoPhysicalFunction.cpp | 125 + ...ouchesTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/EtouchesTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/EtouchesTgeoTgeoPhysicalFunction.cpp | 117 + .../EtouchesTpointGeoPhysicalFunction.cpp | 124 + .../EtouchesTrgeometryGeoPhysicalFunction.cpp | 97 + .../EverEqBigintTbigintPhysicalFunction.cpp | 98 + .../Meos/EverEqBoolTboolPhysicalFunction.cpp | 98 + .../EverEqFloatTfloatPhysicalFunction.cpp | 89 + .../EverEqGeoTrgeometryPhysicalFunction.cpp | 98 + .../Meos/EverEqIntTintPhysicalFunction.cpp | 89 + .../EverEqNpointTnpointPhysicalFunction.cpp | 112 + .../Meos/EverEqPoseTposePhysicalFunction.cpp | 121 + .../EverEqTbigintBigintPhysicalFunction.cpp | 98 + .../Meos/EverEqTboolBoolPhysicalFunction.cpp | 98 + .../EverEqTcbufferCbufferPhysicalFunction.cpp | 126 + ...EverEqTcbufferTcbufferPhysicalFunction.cpp | 127 + ...EverEqTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/EverEqTextTtextPhysicalFunction.cpp | 106 + .../EverEqTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/EverEqTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/EverEqTgeoTgeoPhysicalFunction.cpp | 117 + .../EverEqTh3indexH3indexPhysicalFunction.cpp | 97 + .../Meos/EverEqTintIntPhysicalFunction.cpp | 88 + .../EverEqTjsonbJsonbPhysicalFunction.cpp | 105 + .../EverEqTjsonbTjsonbPhysicalFunction.cpp | 113 + .../EverEqTnpointNpointPhysicalFunction.cpp | 112 + .../EverEqTnpointTnpointPhysicalFunction.cpp | 120 + .../Meos/EverEqTposePosePhysicalFunction.cpp | 121 + .../Meos/EverEqTposeTposePhysicalFunction.cpp | 129 + .../EverEqTquadbinQuadbinPhysicalFunction.cpp | 97 + .../EverEqTrgeometryGeoPhysicalFunction.cpp | 98 + ...EqTrgeometryTrgeometryPhysicalFunction.cpp | 115 + .../Meos/EverEqTtextTextPhysicalFunction.cpp | 106 + .../EverGeBigintTbigintPhysicalFunction.cpp | 98 + .../EverGeFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/EverGeIntTintPhysicalFunction.cpp | 89 + .../EverGeTbigintBigintPhysicalFunction.cpp | 98 + ...EverGeTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/EverGeTextTtextPhysicalFunction.cpp | 106 + .../EverGeTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/EverGeTintIntPhysicalFunction.cpp | 88 + .../Meos/EverGeTtextTextPhysicalFunction.cpp | 106 + .../EverGtBigintTbigintPhysicalFunction.cpp | 98 + .../EverGtFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/EverGtIntTintPhysicalFunction.cpp | 89 + .../EverGtTbigintBigintPhysicalFunction.cpp | 98 + ...EverGtTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/EverGtTextTtextPhysicalFunction.cpp | 106 + .../EverGtTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/EverGtTintIntPhysicalFunction.cpp | 88 + .../Meos/EverGtTtextTextPhysicalFunction.cpp | 106 + .../EverLeBigintTbigintPhysicalFunction.cpp | 98 + .../EverLeFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/EverLeIntTintPhysicalFunction.cpp | 89 + .../EverLeTbigintBigintPhysicalFunction.cpp | 98 + ...EverLeTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/EverLeTextTtextPhysicalFunction.cpp | 106 + .../EverLeTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/EverLeTintIntPhysicalFunction.cpp | 88 + .../Meos/EverLeTtextTextPhysicalFunction.cpp | 106 + .../EverLtBigintTbigintPhysicalFunction.cpp | 98 + .../EverLtFloatTfloatPhysicalFunction.cpp | 89 + .../Meos/EverLtIntTintPhysicalFunction.cpp | 89 + .../EverLtTbigintBigintPhysicalFunction.cpp | 98 + ...EverLtTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/EverLtTextTtextPhysicalFunction.cpp | 106 + .../EverLtTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/EverLtTintIntPhysicalFunction.cpp | 88 + .../Meos/EverLtTtextTextPhysicalFunction.cpp | 106 + .../EverNeBigintTbigintPhysicalFunction.cpp | 98 + .../Meos/EverNeBoolTboolPhysicalFunction.cpp | 98 + .../EverNeFloatTfloatPhysicalFunction.cpp | 89 + .../EverNeGeoTrgeometryPhysicalFunction.cpp | 98 + .../Meos/EverNeIntTintPhysicalFunction.cpp | 89 + .../EverNeNpointTnpointPhysicalFunction.cpp | 112 + .../Meos/EverNePoseTposePhysicalFunction.cpp | 121 + .../EverNeTbigintBigintPhysicalFunction.cpp | 98 + .../Meos/EverNeTboolBoolPhysicalFunction.cpp | 98 + .../EverNeTcbufferCbufferPhysicalFunction.cpp | 126 + ...EverNeTcbufferTcbufferPhysicalFunction.cpp | 127 + ...EverNeTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/EverNeTextTtextPhysicalFunction.cpp | 106 + .../EverNeTfloatFloatPhysicalFunction.cpp | 88 + .../Meos/EverNeTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/EverNeTgeoTgeoPhysicalFunction.cpp | 117 + .../EverNeTh3indexH3indexPhysicalFunction.cpp | 97 + .../Meos/EverNeTintIntPhysicalFunction.cpp | 88 + .../EverNeTjsonbJsonbPhysicalFunction.cpp | 105 + .../EverNeTjsonbTjsonbPhysicalFunction.cpp | 113 + .../EverNeTnpointNpointPhysicalFunction.cpp | 112 + .../EverNeTnpointTnpointPhysicalFunction.cpp | 120 + .../Meos/EverNeTposePosePhysicalFunction.cpp | 121 + .../Meos/EverNeTposeTposePhysicalFunction.cpp | 129 + .../EverNeTquadbinQuadbinPhysicalFunction.cpp | 97 + .../EverNeTrgeometryGeoPhysicalFunction.cpp | 98 + ...NeTrgeometryTrgeometryPhysicalFunction.cpp | 115 + .../Meos/EverNeTtextTextPhysicalFunction.cpp | 106 + .../FloatspanLowerIncPhysicalFunction.cpp | 87 + .../Meos/FloatspanLowerPhysicalFunction.cpp | 87 + .../FloatspanUpperIncPhysicalFunction.cpp | 87 + .../Meos/FloatspanUpperPhysicalFunction.cpp | 87 + .../Meos/FloatspanWidthPhysicalFunction.cpp | 87 + .../Meos/FrontStboxStboxPhysicalFunction.cpp | 100 + .../FrontStboxTspatialPhysicalFunction.cpp | 109 + .../FrontTspatialStboxPhysicalFunction.cpp | 109 + .../FrontTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/GeoAsEwktPhysicalFunction.cpp | 105 + .../Meos/GeoAsGeojsonPhysicalFunction.cpp | 110 + .../Meos/GeoEqualsPhysicalFunction.cpp | 97 + .../Meos/GeoGeoNPhysicalFunction.cpp | 108 + .../Meos/GeoIsUnitaryPhysicalFunction.cpp | 88 + .../Meos/GeoNumGeosPhysicalFunction.cpp | 88 + .../Meos/GeoNumPointsPhysicalFunction.cpp | 88 + .../Meos/GeoPointsPhysicalFunction.cpp | 103 + .../Meos/GeoReversePhysicalFunction.cpp | 103 + .../Meos/GeoRoundPhysicalFunction.cpp | 108 + .../Meos/GeoSamePhysicalFunction.cpp | 97 + .../Meos/GeoSetSridPhysicalFunction.cpp | 108 + .../Meos/GeoSridPhysicalFunction.cpp | 88 + .../Meos/GeoTransformPhysicalFunction.cpp | 108 + .../Meos/GeogAreaPhysicalFunction.cpp | 88 + .../Meos/GeogCentroidPhysicalFunction.cpp | 108 + .../Meos/GeogDistancePhysicalFunction.cpp | 97 + .../Meos/GeogDwithinPhysicalFunction.cpp | 102 + .../Meos/GeogIntersectsPhysicalFunction.cpp | 97 + .../Meos/GeogLengthPhysicalFunction.cpp | 88 + .../Meos/GeogPerimeterPhysicalFunction.cpp | 88 + .../Meos/GeogPointMake2dPhysicalFunction.cpp | 109 + .../Meos/GeogPointMake3dzPhysicalFunction.cpp | 114 + .../Meos/GeogToGeomPhysicalFunction.cpp | 103 + .../Meos/GeomAzimuthPhysicalFunction.cpp | 88 + .../Meos/GeomBoundaryPhysicalFunction.cpp | 103 + .../Meos/GeomCentroidPhysicalFunction.cpp | 103 + .../Meos/GeomContainsPhysicalFunction.cpp | 97 + .../Meos/GeomConvexHullPhysicalFunction.cpp | 103 + .../Meos/GeomCoversPhysicalFunction.cpp | 97 + .../Meos/GeomDifference2dPhysicalFunction.cpp | 112 + .../Meos/GeomDisjoint2dPhysicalFunction.cpp | 97 + .../Meos/GeomDistance2dPhysicalFunction.cpp | 97 + .../Meos/GeomDistance3dPhysicalFunction.cpp | 97 + .../Meos/GeomDwithin2dPhysicalFunction.cpp | 102 + .../Meos/GeomDwithin3dPhysicalFunction.cpp | 102 + .../Meos/GeomDwithinPhysicalFunction.cpp | 102 + ...GeomIntersection2dCollPhysicalFunction.cpp | 112 + .../GeomIntersection2dPhysicalFunction.cpp | 112 + .../Meos/GeomIntersects2dPhysicalFunction.cpp | 97 + .../Meos/GeomIntersects3dPhysicalFunction.cpp | 97 + .../Meos/GeomIntersectsPhysicalFunction.cpp | 97 + .../Meos/GeomIsEmptyPhysicalFunction.cpp | 88 + .../Meos/GeomLengthPhysicalFunction.cpp | 88 + .../Meos/GeomPerimeterPhysicalFunction.cpp | 88 + .../Meos/GeomPointMake2dPhysicalFunction.cpp | 109 + .../Meos/GeomPointMake3dzPhysicalFunction.cpp | 114 + .../GeomShortestline2dPhysicalFunction.cpp | 112 + .../GeomShortestline3dPhysicalFunction.cpp | 112 + .../Meos/GeomToGeogPhysicalFunction.cpp | 103 + .../Meos/GeomTouchesPhysicalFunction.cpp | 97 + .../Meos/GeomUnaryUnionPhysicalFunction.cpp | 103 + .../Meos/H3indexCmpPhysicalFunction.cpp | 89 + .../Meos/H3indexEqPhysicalFunction.cpp | 89 + .../Meos/H3indexGePhysicalFunction.cpp | 89 + .../Meos/H3indexGtPhysicalFunction.cpp | 89 + .../Meos/H3indexLePhysicalFunction.cpp | 89 + .../Meos/H3indexLtPhysicalFunction.cpp | 89 + .../Meos/H3indexNePhysicalFunction.cpp | 89 + .../Meos/H3indexOutPhysicalFunction.cpp | 98 + .../Meos/IntspanLowerIncPhysicalFunction.cpp | 87 + .../Meos/IntspanLowerPhysicalFunction.cpp | 87 + .../Meos/IntspanUpperIncPhysicalFunction.cpp | 87 + .../Meos/IntspanUpperPhysicalFunction.cpp | 87 + .../Meos/IntspanWidthPhysicalFunction.cpp | 87 + .../JsonbArrayElementTextPhysicalFunction.cpp | 108 + .../Meos/JsonbArrayLengthPhysicalFunction.cpp | 88 + .../Meos/JsonbCmpPhysicalFunction.cpp | 97 + .../Meos/JsonbContainedPhysicalFunction.cpp | 97 + .../Meos/JsonbContainsPhysicalFunction.cpp | 97 + .../Meos/JsonbEqPhysicalFunction.cpp | 97 + .../Meos/JsonbExistsPhysicalFunction.cpp | 99 + .../Meos/JsonbGePhysicalFunction.cpp | 97 + .../Meos/JsonbGtPhysicalFunction.cpp | 97 + .../Meos/JsonbLePhysicalFunction.cpp | 97 + .../Meos/JsonbLtPhysicalFunction.cpp | 97 + .../Meos/JsonbNePhysicalFunction.cpp | 97 + .../JsonbObjectFieldTextPhysicalFunction.cpp | 114 + .../Meos/JsonbPrettyPhysicalFunction.cpp | 100 + .../Meos/JsonbToCstringPhysicalFunction.cpp | 100 + .../Meos/LeftStboxStboxPhysicalFunction.cpp | 100 + .../LeftStboxTspatialPhysicalFunction.cpp | 109 + .../Meos/LeftTboxTnumberPhysicalFunction.cpp | 103 + .../Meos/LeftTnumberTboxPhysicalFunction.cpp | 103 + .../LeftTnumberTnumberPhysicalFunction.cpp | 96 + .../LeftTspatialStboxPhysicalFunction.cpp | 109 + .../LeftTspatialTspatialPhysicalFunction.cpp | 117 + .../LineInterpolatePointPhysicalFunction.cpp | 108 + .../Meos/LineLocatePointPhysicalFunction.cpp | 97 + .../Meos/LineNumpointsPhysicalFunction.cpp | 88 + .../Meos/LinePointNPhysicalFunction.cpp | 108 + .../Meos/LineSubstringPhysicalFunction.cpp | 113 + ...stanceTcbufferTcbufferPhysicalFunction.cpp | 132 + .../Meos/MulBigintTbigintPhysicalFunction.cpp | 101 + .../Meos/MulFloatTfloatPhysicalFunction.cpp | 101 + .../Meos/MulIntTintPhysicalFunction.cpp | 101 + .../Meos/MulTbigintBigintPhysicalFunction.cpp | 101 + .../Meos/MulTfloatFloatPhysicalFunction.cpp | 101 + .../Meos/MulTintIntPhysicalFunction.cpp | 101 + .../MulTnumberTnumberPhysicalFunction.cpp | 122 + .../MultTnumberTnumberPhysicalFunction.cpp | 122 + .../Meos/NadStboxStboxPhysicalFunction.cpp | 100 + .../Meos/NadTcbufferGeoPhysicalFunction.cpp | 125 + .../Meos/NadTcbufferStboxPhysicalFunction.cpp | 116 + .../NadTcbufferTcbufferPhysicalFunction.cpp | 127 + .../Meos/NadTfloatTboxPhysicalFunction.cpp | 103 + .../Meos/NadTgeoGeoPhysicalFunction.cpp | 124 + .../Meos/NadTgeoStboxPhysicalFunction.cpp | 109 + .../Meos/NadTgeoTgeoPhysicalFunction.cpp | 117 + .../Meos/NadTintTboxPhysicalFunction.cpp | 103 + .../Meos/NadTnpointGeoPhysicalFunction.cpp | 109 + .../Meos/NadTnpointNpointPhysicalFunction.cpp | 112 + .../Meos/NadTnpointStboxPhysicalFunction.cpp | 111 + .../NadTnpointTnpointPhysicalFunction.cpp | 120 + .../Meos/NadTposeGeoPhysicalFunction.cpp | 113 + .../Meos/NadTposePosePhysicalFunction.cpp | 122 + .../Meos/NadTposeStboxPhysicalFunction.cpp | 115 + .../Meos/NadTposeTposePhysicalFunction.cpp | 129 + .../Meos/NadTrgeometryGeoPhysicalFunction.cpp | 98 + ...adTrgeometryTrgeometryPhysicalFunction.cpp | 115 + .../OveraboveStboxStboxPhysicalFunction.cpp | 100 + ...OveraboveStboxTspatialPhysicalFunction.cpp | 109 + ...OveraboveTspatialStboxPhysicalFunction.cpp | 109 + ...raboveTspatialTspatialPhysicalFunction.cpp | 117 + .../OverafterStboxStboxPhysicalFunction.cpp | 100 + ...OverafterStboxTspatialPhysicalFunction.cpp | 109 + .../OverafterTboxTnumberPhysicalFunction.cpp | 103 + ...rafterTemporalTemporalPhysicalFunction.cpp | 117 + .../OverafterTnumberTboxPhysicalFunction.cpp | 103 + ...verafterTnumberTnumberPhysicalFunction.cpp | 96 + ...OverafterTspatialStboxPhysicalFunction.cpp | 109 + ...rafterTspatialTspatialPhysicalFunction.cpp | 117 + .../OverbackStboxStboxPhysicalFunction.cpp | 100 + .../OverbackStboxTspatialPhysicalFunction.cpp | 109 + .../OverbackTspatialStboxPhysicalFunction.cpp | 109 + ...erbackTspatialTspatialPhysicalFunction.cpp | 117 + .../OverbeforeStboxStboxPhysicalFunction.cpp | 100 + ...verbeforeStboxTspatialPhysicalFunction.cpp | 109 + .../OverbeforeTboxTnumberPhysicalFunction.cpp | 103 + ...beforeTemporalTemporalPhysicalFunction.cpp | 117 + .../OverbeforeTnumberTboxPhysicalFunction.cpp | 103 + ...erbeforeTnumberTnumberPhysicalFunction.cpp | 96 + ...verbeforeTspatialStboxPhysicalFunction.cpp | 109 + ...beforeTspatialTspatialPhysicalFunction.cpp | 117 + .../OverbelowStboxStboxPhysicalFunction.cpp | 100 + ...OverbelowStboxTspatialPhysicalFunction.cpp | 109 + ...OverbelowTspatialStboxPhysicalFunction.cpp | 109 + ...rbelowTspatialTspatialPhysicalFunction.cpp | 117 + .../OverfrontStboxStboxPhysicalFunction.cpp | 100 + ...OverfrontStboxTspatialPhysicalFunction.cpp | 109 + ...OverfrontTspatialStboxPhysicalFunction.cpp | 109 + ...rfrontTspatialTspatialPhysicalFunction.cpp | 117 + .../OverlapsStboxStboxPhysicalFunction.cpp | 100 + .../OverlapsStboxTspatialPhysicalFunction.cpp | 109 + .../OverlapsTboxTnumberPhysicalFunction.cpp | 103 + ...erlapsTemporalTemporalPhysicalFunction.cpp | 117 + .../OverlapsTnumberTboxPhysicalFunction.cpp | 103 + ...OverlapsTnumberTnumberPhysicalFunction.cpp | 96 + .../OverlapsTspatialStboxPhysicalFunction.cpp | 109 + ...erlapsTspatialTspatialPhysicalFunction.cpp | 117 + .../OverleftStboxStboxPhysicalFunction.cpp | 100 + .../OverleftStboxTspatialPhysicalFunction.cpp | 109 + .../OverleftTboxTnumberPhysicalFunction.cpp | 103 + .../OverleftTnumberTboxPhysicalFunction.cpp | 103 + ...OverleftTnumberTnumberPhysicalFunction.cpp | 96 + .../OverleftTspatialStboxPhysicalFunction.cpp | 109 + ...erleftTspatialTspatialPhysicalFunction.cpp | 117 + .../OverrightStboxStboxPhysicalFunction.cpp | 100 + ...OverrightStboxTspatialPhysicalFunction.cpp | 109 + .../OverrightTboxTnumberPhysicalFunction.cpp | 103 + .../OverrightTnumberTboxPhysicalFunction.cpp | 103 + ...verrightTnumberTnumberPhysicalFunction.cpp | 96 + ...OverrightTspatialStboxPhysicalFunction.cpp | 109 + ...rrightTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/QuadbinCellAreaPhysicalFunction.cpp | 84 + .../QuadbinCellToParentPhysicalFunction.cpp | 102 + .../QuadbinCellToQuadkeyPhysicalFunction.cpp | 96 + .../Meos/QuadbinCmpPhysicalFunction.cpp | 89 + .../Meos/QuadbinEqPhysicalFunction.cpp | 89 + .../Meos/QuadbinGePhysicalFunction.cpp | 89 + .../QuadbinGetResolutionPhysicalFunction.cpp | 84 + .../Meos/QuadbinGtPhysicalFunction.cpp | 89 + .../QuadbinIsValidCellPhysicalFunction.cpp | 84 + .../Meos/QuadbinLePhysicalFunction.cpp | 89 + .../Meos/QuadbinLtPhysicalFunction.cpp | 89 + .../Meos/QuadbinNePhysicalFunction.cpp | 89 + .../QuadbinPointToCellPhysicalFunction.cpp | 107 + .../QuadbinTileToCellPhysicalFunction.cpp | 107 + .../Meos/RightStboxStboxPhysicalFunction.cpp | 100 + .../RightStboxTspatialPhysicalFunction.cpp | 109 + .../Meos/RightTboxTnumberPhysicalFunction.cpp | 103 + .../Meos/RightTnumberTboxPhysicalFunction.cpp | 103 + .../RightTnumberTnumberPhysicalFunction.cpp | 96 + .../RightTspatialStboxPhysicalFunction.cpp | 109 + .../RightTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/SameStboxStboxPhysicalFunction.cpp | 100 + .../SameStboxTspatialPhysicalFunction.cpp | 109 + .../Meos/SameTboxTnumberPhysicalFunction.cpp | 103 + .../SameTemporalTemporalPhysicalFunction.cpp | 117 + .../Meos/SameTnumberTboxPhysicalFunction.cpp | 103 + .../SameTnumberTnumberPhysicalFunction.cpp | 96 + .../SameTspatialStboxPhysicalFunction.cpp | 109 + .../SameTspatialTspatialPhysicalFunction.cpp | 117 + .../Meos/StboxCmpPhysicalFunction.cpp | 100 + .../Meos/StboxEqPhysicalFunction.cpp | 100 + .../Meos/StboxGePhysicalFunction.cpp | 100 + .../Meos/StboxGtPhysicalFunction.cpp | 100 + .../Meos/StboxLePhysicalFunction.cpp | 100 + .../Meos/StboxLtPhysicalFunction.cpp | 100 + .../Meos/StboxNePhysicalFunction.cpp | 100 + .../Meos/SubBigintTbigintPhysicalFunction.cpp | 101 + .../Meos/SubFloatTfloatPhysicalFunction.cpp | 101 + .../Meos/SubIntTintPhysicalFunction.cpp | 101 + .../Meos/SubTbigintBigintPhysicalFunction.cpp | 101 + .../Meos/SubTfloatFloatPhysicalFunction.cpp | 101 + .../Meos/SubTintIntPhysicalFunction.cpp | 101 + .../SubTnumberTnumberPhysicalFunction.cpp | 122 + .../Meos/TEqTextTtextPhysicalFunction.cpp | 106 + .../Meos/TEqTtextTextPhysicalFunction.cpp | 106 + .../Meos/TGeTextTtextPhysicalFunction.cpp | 106 + .../Meos/TGeTtextTextPhysicalFunction.cpp | 106 + .../Meos/TGtTextTtextPhysicalFunction.cpp | 106 + .../Meos/TGtTtextTextPhysicalFunction.cpp | 106 + .../Meos/TLeTextTtextPhysicalFunction.cpp | 106 + .../Meos/TLeTtextTextPhysicalFunction.cpp | 106 + .../Meos/TLtTextTtextPhysicalFunction.cpp | 106 + .../Meos/TLtTtextTextPhysicalFunction.cpp | 106 + .../Meos/TNeTextTtextPhysicalFunction.cpp | 106 + .../Meos/TNeTtextTextPhysicalFunction.cpp | 106 + .../Meos/TandBoolTboolPhysicalFunction.cpp | 101 + .../Meos/TandTboolBoolPhysicalFunction.cpp | 101 + .../Meos/TandTboolTboolPhysicalFunction.cpp | 122 + .../TbigintScaleValuePhysicalFunction.cpp | 101 + ...TbigintShiftScaleValuePhysicalFunction.cpp | 106 + .../TbigintShiftValuePhysicalFunction.cpp | 101 + .../Meos/TbigintToTfloatPhysicalFunction.cpp | 96 + .../Meos/TbigintToTintPhysicalFunction.cpp | 96 + .../Meos/TboolEndValuePhysicalFunction.cpp | 91 + .../Meos/TboolStartValuePhysicalFunction.cpp | 91 + .../Meos/TboolToTintPhysicalFunction.cpp | 96 + .../Meos/TcbufferToTfloatPhysicalFunction.cpp | 107 + ...ntainsTcbufferTcbufferPhysicalFunction.cpp | 123 + .../TcontainsTgeoTgeoPhysicalFunction.cpp | 122 + ...coversTcbufferTcbufferPhysicalFunction.cpp | 123 + .../Meos/TcoversTgeoTgeoPhysicalFunction.cpp | 122 + ...stanceTcbufferTcbufferPhysicalFunction.cpp | 123 + .../TdistanceTfloatFloatPhysicalFunction.cpp | 101 + .../TdistanceTgeoTgeoPhysicalFunction.cpp | 122 + .../Meos/TdistanceTintIntPhysicalFunction.cpp | 101 + ...distanceTnpointTnpointPhysicalFunction.cpp | 123 + ...distanceTnumberTnumberPhysicalFunction.cpp | 122 + .../TdistanceTposeTposePhysicalFunction.cpp | 123 + ...poralAContainsGeometryPhysicalFunction.cpp | 124 + ...ontainsTCbufferCbufferPhysicalFunction.cpp | 126 + ...poralAContainsTCbufferPhysicalFunction.cpp | 125 + ...oralAContainsTGeometryPhysicalFunction.cpp | 117 + ...ontainsTNpointGeometryPhysicalFunction.cpp | 118 + ...ContainsTNpointTNpointPhysicalFunction.cpp | 126 + ...AContainsTPoseGeometryPhysicalFunction.cpp | 124 + ...ralAContainsTPoseTPosePhysicalFunction.cpp | 136 + ...ACoversTCbufferCbufferPhysicalFunction.cpp | 126 + ...emporalACoversTCbufferPhysicalFunction.cpp | 125 + ...mporalADWithinGeometryPhysicalFunction.cpp | 125 + ...DWithinTCbufferCbufferPhysicalFunction.cpp | 126 + ...WithinTCbufferGeometryPhysicalFunction.cpp | 125 + ...WithinTCbufferTCbufferPhysicalFunction.cpp | 132 + ...poralADWithinTGeometryPhysicalFunction.cpp | 124 + ...DWithinTNpointGeometryPhysicalFunction.cpp | 122 + ...ADWithinTNpointTNpointPhysicalFunction.cpp | 131 + ...lADWithinTPoseGeometryPhysicalFunction.cpp | 128 + ...oralADWithinTPoseTPosePhysicalFunction.cpp | 141 + ...poralADisjointGeometryPhysicalFunction.cpp | 124 + ...isjointTCbufferCbufferPhysicalFunction.cpp | 126 + ...poralADisjointTCbufferPhysicalFunction.cpp | 125 + ...sjointTCbufferTCbufferPhysicalFunction.cpp | 127 + ...oralADisjointTGeometryPhysicalFunction.cpp | 117 + ...isjointTNpointGeometryPhysicalFunction.cpp | 118 + ...DisjointTNpointTNpointPhysicalFunction.cpp | 126 + ...ADisjointTPoseGeometryPhysicalFunction.cpp | 124 + ...ralADisjointTPoseTPosePhysicalFunction.cpp | 136 + ...ralAIntersectsGeometryPhysicalFunction.cpp | 285 +- ...ersectsTCbufferCbufferPhysicalFunction.cpp | 126 + ...ralAIntersectsTCbufferPhysicalFunction.cpp | 125 + ...rsectsTCbufferTCbufferPhysicalFunction.cpp | 127 + ...alAIntersectsTGeometryPhysicalFunction.cpp | 117 + ...ersectsTNpointGeometryPhysicalFunction.cpp | 118 + ...tersectsTNpointTNpointPhysicalFunction.cpp | 126 + ...ntersectsTPoseGeometryPhysicalFunction.cpp | 124 + ...lAIntersectsTPoseTPosePhysicalFunction.cpp | 136 + ...mporalATouchesGeometryPhysicalFunction.cpp | 124 + ...TouchesTCbufferCbufferPhysicalFunction.cpp | 126 + ...mporalATouchesTCbufferPhysicalFunction.cpp | 125 + ...ouchesTCbufferTCbufferPhysicalFunction.cpp | 127 + ...poralATouchesTGeometryPhysicalFunction.cpp | 117 + ...TouchesTNpointGeometryPhysicalFunction.cpp | 118 + ...ATouchesTNpointTNpointPhysicalFunction.cpp | 126 + ...lATouchesTPoseGeometryPhysicalFunction.cpp | 124 + ...oralATouchesTPoseTPosePhysicalFunction.cpp | 136 + .../TemporalAtGeometryPhysicalFunction.cpp | 124 + .../Meos/TemporalAtStBoxPhysicalFunction.cpp | 132 +- .../Meos/TemporalCmpPhysicalFunction.cpp | 117 + ...ralDyntimewarpDistancePhysicalFunction.cpp | 117 + ...poralEContainsGeometryPhysicalFunction.cpp | 319 +- ...ontainsTCbufferCbufferPhysicalFunction.cpp | 126 + ...poralEContainsTCbufferPhysicalFunction.cpp | 125 + ...oralEContainsTGeometryPhysicalFunction.cpp | 117 + ...ontainsTNpointGeometryPhysicalFunction.cpp | 118 + ...ContainsTNpointTNpointPhysicalFunction.cpp | 126 + ...EContainsTPoseGeometryPhysicalFunction.cpp | 124 + ...ralEContainsTPoseTPosePhysicalFunction.cpp | 136 + ...emporalECoversGeometryPhysicalFunction.cpp | 124 + ...ECoversTCbufferCbufferPhysicalFunction.cpp | 126 + ...emporalECoversTCbufferPhysicalFunction.cpp | 125 + ...CoversTCbufferTCbufferPhysicalFunction.cpp | 127 + ...mporalECoversTGeometryPhysicalFunction.cpp | 117 + ...ECoversTNpointGeometryPhysicalFunction.cpp | 118 + ...lECoversTNpointTNpointPhysicalFunction.cpp | 126 + ...alECoversTPoseGeometryPhysicalFunction.cpp | 124 + ...poralECoversTPoseTPosePhysicalFunction.cpp | 136 + ...mporalEDWithinGeometryPhysicalFunction.cpp | 80 +- ...DWithinTCbufferCbufferPhysicalFunction.cpp | 126 + ...WithinTCbufferGeometryPhysicalFunction.cpp | 125 + ...WithinTCbufferTCbufferPhysicalFunction.cpp | 132 + ...poralEDWithinTGeometryPhysicalFunction.cpp | 124 + ...DWithinTNpointGeometryPhysicalFunction.cpp | 122 + ...EDWithinTNpointTNpointPhysicalFunction.cpp | 131 + ...lEDWithinTPoseGeometryPhysicalFunction.cpp | 128 + ...oralEDWithinTPoseTPosePhysicalFunction.cpp | 141 + ...poralEDisjointGeometryPhysicalFunction.cpp | 124 + ...isjointTCbufferCbufferPhysicalFunction.cpp | 126 + ...poralEDisjointTCbufferPhysicalFunction.cpp | 125 + ...oralEDisjointTGeometryPhysicalFunction.cpp | 117 + ...isjointTNpointGeometryPhysicalFunction.cpp | 118 + ...DisjointTNpointTNpointPhysicalFunction.cpp | 126 + ...EDisjointTPoseGeometryPhysicalFunction.cpp | 124 + ...ralEDisjointTPoseTPosePhysicalFunction.cpp | 136 + ...ralEIntersectsGeometryPhysicalFunction.cpp | 124 + ...ersectsTCbufferCbufferPhysicalFunction.cpp | 126 + ...ralEIntersectsTCbufferPhysicalFunction.cpp | 125 + ...rsectsTCbufferTCbufferPhysicalFunction.cpp | 127 + ...alEIntersectsTGeometryPhysicalFunction.cpp | 117 + ...ersectsTNpointGeometryPhysicalFunction.cpp | 118 + ...tersectsTNpointTNpointPhysicalFunction.cpp | 126 + ...ntersectsTPoseGeometryPhysicalFunction.cpp | 124 + ...lEIntersectsTPoseTPosePhysicalFunction.cpp | 136 + ...mporalETouchesGeometryPhysicalFunction.cpp | 124 + ...TouchesTCbufferCbufferPhysicalFunction.cpp | 126 + ...mporalETouchesTCbufferPhysicalFunction.cpp | 125 + ...ouchesTCbufferTCbufferPhysicalFunction.cpp | 127 + ...poralETouchesTGeometryPhysicalFunction.cpp | 117 + ...TouchesTNpointGeometryPhysicalFunction.cpp | 118 + ...ETouchesTNpointTNpointPhysicalFunction.cpp | 126 + ...lETouchesTPoseGeometryPhysicalFunction.cpp | 124 + ...oralETouchesTPoseTPosePhysicalFunction.cpp | 136 + .../Meos/TemporalEqPhysicalFunction.cpp | 117 + ...emporalFrechetDistancePhysicalFunction.cpp | 117 + .../Meos/TemporalGePhysicalFunction.cpp | 117 + .../Meos/TemporalGtPhysicalFunction.cpp | 117 + ...poralHausdorffDistancePhysicalFunction.cpp | 117 + ...oralIntersectsGeometryPhysicalFunction.cpp | 250 +- .../Meos/TemporalLePhysicalFunction.cpp | 117 + .../Meos/TemporalLtPhysicalFunction.cpp | 117 + .../TemporalMinusGeometryPhysicalFunction.cpp | 124 + ...TemporalNADFloatScalarPhysicalFunction.cpp | 88 + .../TemporalNADGeometryPhysicalFunction.cpp | 117 + .../TemporalNADIntScalarPhysicalFunction.cpp | 88 + ...oralNADTCbufferCbufferPhysicalFunction.cpp | 126 + .../TemporalNADTCbufferPhysicalFunction.cpp | 125 + ...ralNADTCbufferTCbufferPhysicalFunction.cpp | 127 + .../TemporalNADTFloatPhysicalFunction.cpp | 105 + .../TemporalNADTGeometryPhysicalFunction.cpp | 117 + .../Meos/TemporalNADTIntPhysicalFunction.cpp | 105 + ...oralNADTNpointGeometryPhysicalFunction.cpp | 118 + ...poralNADTNpointTNpointPhysicalFunction.cpp | 126 + ...mporalNADTPoseGeometryPhysicalFunction.cpp | 124 + .../TemporalNADTPoseTPosePhysicalFunction.cpp | 136 + .../Meos/TemporalNePhysicalFunction.cpp | 117 + .../Meos/TemporalRoundPhysicalFunction.cpp | 101 + .../Meos/TeqBoolTboolPhysicalFunction.cpp | 101 + .../Meos/TeqTboolBoolPhysicalFunction.cpp | 101 + .../Meos/TextInitcapPhysicalFunction.cpp | 104 + .../Meos/TextLowerPhysicalFunction.cpp | 104 + .../Meos/TextUpperPhysicalFunction.cpp | 104 + .../Meos/TextcatTextTtextPhysicalFunction.cpp | 124 + .../Meos/TextcatTtextTextPhysicalFunction.cpp | 124 + .../TextcatTtextTtextPhysicalFunction.cpp | 130 + .../Meos/TfloatCeilPhysicalFunction.cpp | 96 + .../Meos/TfloatExpPhysicalFunction.cpp | 96 + .../Meos/TfloatFloorPhysicalFunction.cpp | 96 + .../Meos/TfloatLnPhysicalFunction.cpp | 96 + .../Meos/TfloatLog10PhysicalFunction.cpp | 96 + .../Meos/TfloatRadiansPhysicalFunction.cpp | 96 + .../Meos/TfloatScaleValuePhysicalFunction.cpp | 101 + .../TfloatShiftScaleValuePhysicalFunction.cpp | 106 + .../Meos/TfloatShiftValuePhysicalFunction.cpp | 101 + .../Meos/TfloatToTbigintPhysicalFunction.cpp | 96 + .../Meos/TfloatToTintPhysicalFunction.cpp | 96 + ...3indexAreNeighborCellsPhysicalFunction.cpp | 105 + ...xCellToCenterChildNextPhysicalFunction.cpp | 113 + ...indexCellToCenterChildPhysicalFunction.cpp | 113 + ...Th3indexCellToChildPosPhysicalFunction.cpp | 97 + ...3indexCellToParentNextPhysicalFunction.cpp | 113 + .../Th3indexCellToParentPhysicalFunction.cpp | 113 + ...indexGetBaseCellNumberPhysicalFunction.cpp | 92 + .../Th3indexGetResolutionPhysicalFunction.cpp | 92 + .../Th3indexGridDistancePhysicalFunction.cpp | 105 + .../Th3indexIsPentagonPhysicalFunction.cpp | 92 + .../Th3indexIsValidCellPhysicalFunction.cpp | 92 + .../Meos/TintScaleValuePhysicalFunction.cpp | 101 + .../TintShiftScaleValuePhysicalFunction.cpp | 106 + .../Meos/TintShiftValuePhysicalFunction.cpp | 101 + .../Meos/TintToTbigintPhysicalFunction.cpp | 96 + .../Meos/TintToTfloatPhysicalFunction.cpp | 96 + .../Meos/TneBoolTboolPhysicalFunction.cpp | 101 + .../Meos/TneTboolBoolPhysicalFunction.cpp | 101 + .../Meos/TnotTboolPhysicalFunction.cpp | 96 + .../Meos/TnpointLengthPhysicalFunction.cpp | 99 + .../Meos/TorBoolTboolPhysicalFunction.cpp | 101 + .../Meos/TorTboolBoolPhysicalFunction.cpp | 101 + .../Meos/TorTboolTboolPhysicalFunction.cpp | 122 + .../Meos/TpointLengthWkbPhysicalFunction.cpp | 88 + .../Meos/TtextInitcapPhysicalFunction.cpp | 113 + .../Meos/TtextLowerPhysicalFunction.cpp | 113 + .../Meos/TtextUpperPhysicalFunction.cpp | 113 + nes-sql-parser/AntlrSQL.g4 | 772 +- .../src/AntlrSQLQueryPlanCreator.cpp | 21897 ++++++++++++++++ 3056 files changed, 279140 insertions(+), 1188 deletions(-) create mode 100644 nes-logical-operators/include/Functions/Meos/AboveStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AboveStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AboveTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AboveTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcontainsTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcoversTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcoversTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcoversTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AddTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdisjointTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AfterTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AintersectsTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTposePoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysEqTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysGtTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysLtTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNePoseTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTposePoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AlwaysNeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AtouchesTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AtouchesTpointGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BackStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BackStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BackTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BackTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BeforeTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BelowStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BelowStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BelowTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/BelowTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedFloatSpanLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedFloatspanSpanLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedIntSpanLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedSpanSpanLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainedTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsFloatspanSpanLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsSpanFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsSpanIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsSpanSpanLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/ContainsTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/DivTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcontainsTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcoversTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcoversTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcoversTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdisjointTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EintersectsTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EtouchesTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EtouchesTpointGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqNpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqPoseTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTnpointNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTnpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTposePoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTposeTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverEqTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverGtTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverLtTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeNpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNePoseTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTnpointNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTnpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTposePoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTposeTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/EverNeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FloatspanLowerIncLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FloatspanLowerLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FloatspanUpperIncLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FloatspanUpperLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FloatspanWidthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FrontStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FrontStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FrontTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/FrontTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoAsEwktLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoAsGeojsonLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoEqualsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoGeoNLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoIsUnitaryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoNumGeosLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoNumPointsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoPointsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoReverseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoRoundLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoSameLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoSetSridLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoSridLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeoTransformLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogAreaLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogCentroidLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogDistanceLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogDwithinLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogIntersectsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogLengthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogPerimeterLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogPointMake2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogPointMake3dzLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeogToGeomLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomAzimuthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomBoundaryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomCentroidLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomContainsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomConvexHullLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomCoversLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDifference2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDisjoint2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDistance2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDistance3dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDwithin2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDwithin3dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomDwithinLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomIntersection2dCollLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomIntersection2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomIntersects2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomIntersects3dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomIntersectsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomIsEmptyLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomLengthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomPerimeterLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomPointMake2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomPointMake3dzLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomShortestline2dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomShortestline3dLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomToGeogLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomTouchesLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/GeomUnaryUnionLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexCmpLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexEqLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexGeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexGtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexLeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexLtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexNeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/H3indexOutLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/IntspanLowerIncLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/IntspanLowerLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/IntspanUpperIncLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/IntspanUpperLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/IntspanWidthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbArrayElementTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbArrayLengthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbCmpLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbContainedLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbContainsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbEqLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbExistsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbGeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbGtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbLeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbLtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbNeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbObjectFieldTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbPrettyLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/JsonbToCstringLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LeftTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LineInterpolatePointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LineLocatePointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LineNumpointsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LinePointNLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/LineSubstringLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MulTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/MultTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTcbufferGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTcbufferStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTfloatTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTgeoGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTgeoStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTintTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTnpointGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTnpointNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTnpointStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTnpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTposeGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTposePoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTposeStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTposeTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTrgeometryGeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OveraboveStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OveraboveStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OveraboveTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverafterTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbackStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbackStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbackTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbackTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbelowStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbelowStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbelowTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverfrontStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverfrontStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverfrontTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverleftTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/OverrightTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinCellAreaLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinCellToParentLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinCmpLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinEqLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinGeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinGetResolutionLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinGtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinIsValidCellLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinLeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinLtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinNeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinPointToCellLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/QuadbinTileToCellLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/RightTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameStboxStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameStboxTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameTboxTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameTemporalTemporalLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameTnumberTboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameTspatialStboxLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SameTspatialTspatialLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxCmpLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxEqLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxGeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxGtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxLeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxLtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/StboxNeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubBigintTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubFloatTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubIntTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubTbigintBigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/SubTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TEqTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TEqTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TGeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TGeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TGtTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TGtTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TLeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TLeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TLtTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TLtTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TNeTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TNeTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TandBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TandTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TandTboolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TbigintScaleValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TbigintShiftScaleValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TbigintShiftValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TbigintToTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TbigintToTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TboolEndValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TboolStartValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TboolToTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TcbufferToTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TcoversTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTfloatFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTintIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TdistanceTposeTposeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalAtGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalCmpLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalEqLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalFrechetDistanceLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalGeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalGtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalLeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalLtLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalMinusGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADFloatScalarLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADIntScalarLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTFloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTIntLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalNeLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TemporalRoundLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TeqBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TeqTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TextInitcapLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TextLowerLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TextUpperLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TextcatTextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TextcatTtextTextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TextcatTtextTtextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatCeilLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatExpLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatFloorLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatLnLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatLog10LogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatRadiansLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatScaleValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatShiftScaleValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatShiftValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatToTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TfloatToTintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexCellToChildPosLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexCellToParentLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexCellToParentNextLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexGetResolutionLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexGridDistanceLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexIsPentagonLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/Th3indexIsValidCellLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TintScaleValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TintShiftScaleValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TintShiftValueLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TintToTbigintLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TintToTfloatLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TneBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TneTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TnotTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TnpointLengthLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TorBoolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TorTboolBoolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TorTboolTboolLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TpointLengthWkbLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TtextInitcapLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TtextLowerLogicalFunction.hpp create mode 100644 nes-logical-operators/include/Functions/Meos/TtextUpperLogicalFunction.hpp create mode 100644 nes-logical-operators/src/Functions/Meos/AboveStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AboveStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AboveTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AboveTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcontainsTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcoversTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcoversTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcoversTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AddTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdisjointTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AfterTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AintersectsTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTposePoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysEqTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysGtTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysLtTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNePoseTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTposePoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AlwaysNeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AtouchesTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AtouchesTpointGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BackStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BackStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BackTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BackTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BeforeTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BelowStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BelowStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BelowTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/BelowTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedFloatSpanLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedFloatspanSpanLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedIntSpanLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedSpanSpanLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainedTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsFloatspanSpanLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsSpanFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsSpanIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsSpanSpanLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/ContainsTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/DivTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcontainsTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcoversTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcoversTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcoversTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdisjointTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EintersectsTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EtouchesTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EtouchesTpointGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqNpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqPoseTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTnpointNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTnpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTposePoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTposeTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverEqTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverGtTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverLtTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeNpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNePoseTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTnpointNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTnpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTposePoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTposeTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/EverNeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FloatspanLowerIncLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FloatspanLowerLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FloatspanUpperIncLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FloatspanUpperLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FloatspanWidthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FrontStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FrontStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FrontTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/FrontTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoAsEwktLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoAsGeojsonLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoEqualsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoGeoNLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoIsUnitaryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoNumGeosLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoNumPointsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoPointsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoReverseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoRoundLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoSameLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoSetSridLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoSridLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeoTransformLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogAreaLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogCentroidLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogDistanceLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogDwithinLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogIntersectsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogLengthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogPerimeterLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogPointMake2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogPointMake3dzLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeogToGeomLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomAzimuthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomBoundaryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomCentroidLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomContainsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomConvexHullLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomCoversLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDifference2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDisjoint2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDistance2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDistance3dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDwithin2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDwithin3dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomDwithinLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomIntersection2dCollLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomIntersection2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomIntersects2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomIntersects3dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomIntersectsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomIsEmptyLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomLengthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomPerimeterLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomPointMake2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomPointMake3dzLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomShortestline2dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomShortestline3dLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomToGeogLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomTouchesLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/GeomUnaryUnionLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexCmpLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexEqLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexGeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexGtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexLeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexLtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexNeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/H3indexOutLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/IntspanLowerIncLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/IntspanLowerLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/IntspanUpperIncLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/IntspanUpperLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/IntspanWidthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbArrayElementTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbArrayLengthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbCmpLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbContainedLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbContainsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbEqLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbExistsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbGeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbGtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbLeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbLtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbNeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbObjectFieldTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbPrettyLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/JsonbToCstringLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LeftTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LineInterpolatePointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LineLocatePointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LineNumpointsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LinePointNLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/LineSubstringLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MulTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/MultTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTcbufferGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTcbufferStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTfloatTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTgeoGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTgeoStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTintTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTnpointGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTnpointNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTnpointStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTnpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTposeGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTposePoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTposeStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTposeTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTrgeometryGeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OveraboveStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OveraboveStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OveraboveTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverafterTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbackStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbackStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbackTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbackTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbelowStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbelowStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbelowTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverfrontStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverfrontStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverfrontTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverleftTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/OverrightTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinCellAreaLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinCellToParentLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinCmpLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinEqLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinGeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinGetResolutionLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinGtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinIsValidCellLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinLeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinLtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinNeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinPointToCellLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/QuadbinTileToCellLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/RightTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameStboxStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameStboxTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameTboxTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameTemporalTemporalLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameTnumberTboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameTspatialStboxLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SameTspatialTspatialLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxCmpLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxEqLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxGeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxGtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxLeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxLtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/StboxNeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubBigintTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubFloatTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubIntTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubTbigintBigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/SubTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TEqTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TEqTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TGeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TGeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TGtTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TGtTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TLeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TLeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TLtTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TLtTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TNeTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TNeTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TandBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TandTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TandTboolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TbigintScaleValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TbigintShiftScaleValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TbigintShiftValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TbigintToTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TbigintToTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TboolEndValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TboolStartValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TboolToTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TcbufferToTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TcoversTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTfloatFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTintIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TdistanceTposeTposeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalAtGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalCmpLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalEqLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalFrechetDistanceLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalGeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalGtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalLeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalLtLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalMinusGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADFloatScalarLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADIntScalarLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTFloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTIntLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalNeLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TemporalRoundLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TeqBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TeqTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TextInitcapLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TextLowerLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TextUpperLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TextcatTextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TextcatTtextTextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TextcatTtextTtextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatCeilLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatExpLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatFloorLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatLnLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatLog10LogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatRadiansLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatScaleValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatShiftScaleValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatShiftValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatToTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TfloatToTintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexCellToChildPosLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexCellToParentLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexCellToParentNextLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexGetResolutionLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexGridDistanceLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexIsPentagonLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/Th3indexIsValidCellLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TintScaleValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TintShiftScaleValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TintShiftValueLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TintToTbigintLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TintToTfloatLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TneBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TneTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TnotTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TnpointLengthLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TorBoolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TorTboolBoolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TorTboolTboolLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TpointLengthWkbLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TtextInitcapLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TtextLowerLogicalFunction.cpp create mode 100644 nes-logical-operators/src/Functions/Meos/TtextUpperLogicalFunction.cpp create mode 100644 nes-physical-operators/include/Functions/Meos/AboveStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AboveStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AboveTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AboveTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcoversTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AddTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AfterTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTposePosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNePoseTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTposePosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AtouchesTpointGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BackStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BackStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BackTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BackTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BelowStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BelowStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BelowTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/BelowTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedFloatSpanPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedIntSpanPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedSpanSpanPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsSpanFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsSpanIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsSpanSpanPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/DivTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcoversTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EtouchesTpointGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqNpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqPoseTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTnpointNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTposePosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTposeTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverEqTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverGtTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverLtTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeNpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNePoseTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTnpointNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTposePosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTposeTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/EverNeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FloatspanLowerIncPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FloatspanLowerPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FloatspanUpperIncPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FloatspanUpperPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FloatspanWidthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FrontStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FrontStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FrontTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/FrontTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoAsEwktPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoAsGeojsonPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoEqualsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoGeoNPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoIsUnitaryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoNumGeosPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoNumPointsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoPointsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoReversePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoRoundPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoSamePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoSetSridPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoSridPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeoTransformPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogAreaPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogCentroidPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogDistancePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogDwithinPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogIntersectsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogLengthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogPerimeterPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogPointMake2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogPointMake3dzPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeogToGeomPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomAzimuthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomBoundaryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomCentroidPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomContainsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomConvexHullPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomCoversPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDifference2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDisjoint2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDistance2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDistance3dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDwithin2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDwithin3dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomDwithinPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomIntersection2dCollPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomIntersection2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomIntersects2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomIntersects3dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomIntersectsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomIsEmptyPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomLengthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomPerimeterPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomPointMake2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomPointMake3dzPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomShortestline2dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomShortestline3dPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomToGeogPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomTouchesPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/GeomUnaryUnionPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexCmpPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexEqPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexGePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexGtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexLePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexLtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexNePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/H3indexOutPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/IntspanLowerIncPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/IntspanLowerPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/IntspanUpperIncPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/IntspanUpperPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/IntspanWidthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbArrayElementTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbArrayLengthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbCmpPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbContainedPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbContainsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbEqPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbExistsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbGePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbGtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbLePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbLtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbNePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbPrettyPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/JsonbToCstringPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LeftTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LineInterpolatePointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LineLocatePointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LineNumpointsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LinePointNPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/LineSubstringPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MulTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/MultTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTcbufferGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTcbufferStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTfloatTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTgeoGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTgeoStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTintTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTnpointGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTnpointNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTnpointStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTnpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTposeGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTposePosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTposeStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTposeTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTrgeometryGeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OveraboveStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbackStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbackStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbackTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbelowStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverfrontStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinCellAreaPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinCellToParentPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinCmpPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinEqPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinGePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinGetResolutionPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinGtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinIsValidCellPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinLePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinLtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinNePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinPointToCellPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/QuadbinTileToCellPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/RightTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameStboxStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameStboxTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameTboxTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameTemporalTemporalPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameTnumberTboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameTspatialStboxPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SameTspatialTspatialPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxCmpPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxEqPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxGePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxGtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxLePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxLtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/StboxNePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubBigintTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubFloatTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubIntTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubTbigintBigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/SubTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TEqTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TEqTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TGeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TGeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TGtTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TGtTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TLeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TLeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TLtTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TLtTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TNeTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TNeTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TandBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TandTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TandTboolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TbigintScaleValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TbigintShiftValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TbigintToTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TbigintToTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TboolEndValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TboolStartValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TboolToTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TcbufferToTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTintIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TdistanceTposeTposePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalAtGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalCmpPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalEqPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalFrechetDistancePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalGePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalGtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalLePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalLtPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalMinusGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADIntScalarPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTFloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTIntPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalNePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TemporalRoundPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TeqBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TeqTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TextInitcapPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TextLowerPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TextUpperPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TextcatTextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TextcatTtextTextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TextcatTtextTtextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatCeilPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatExpPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatFloorPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatLnPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatLog10PhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatRadiansPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatScaleValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatShiftValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatToTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TfloatToTintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexCellToParentPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexGetResolutionPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexGridDistancePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexIsPentagonPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/Th3indexIsValidCellPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TintScaleValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TintShiftScaleValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TintShiftValuePhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TintToTbigintPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TintToTfloatPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TneBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TneTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TnotTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TnpointLengthPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TorBoolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TorTboolBoolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TorTboolTboolPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TpointLengthWkbPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TtextInitcapPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TtextLowerPhysicalFunction.hpp create mode 100644 nes-physical-operators/include/Functions/Meos/TtextUpperPhysicalFunction.hpp create mode 100644 nes-physical-operators/src/Functions/Meos/AboveStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AboveStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AboveTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AboveTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcoversTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AddTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AfterTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTposePosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNePoseTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTposePosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AtouchesTpointGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BackStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BackStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BackTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BackTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BelowStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BelowStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BelowTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/BelowTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedFloatSpanPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedIntSpanPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedSpanSpanPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsSpanFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsSpanIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsSpanSpanPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/DivTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcoversTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EtouchesTpointGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqNpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqPoseTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTnpointNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTposePosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTposeTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverEqTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverGtTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverLtTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeNpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNePoseTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTnpointNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTposePosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTposeTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/EverNeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FloatspanLowerIncPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FloatspanLowerPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FloatspanUpperIncPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FloatspanUpperPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FloatspanWidthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FrontStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FrontStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FrontTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/FrontTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoAsEwktPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoAsGeojsonPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoEqualsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoGeoNPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoIsUnitaryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoNumGeosPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoNumPointsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoPointsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoReversePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoRoundPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoSamePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoSetSridPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoSridPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeoTransformPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogAreaPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogCentroidPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogDistancePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogDwithinPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogIntersectsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogLengthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogPerimeterPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogPointMake2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogPointMake3dzPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeogToGeomPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomAzimuthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomBoundaryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomCentroidPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomContainsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomConvexHullPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomCoversPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDifference2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDisjoint2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDistance2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDistance3dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDwithin2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDwithin3dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomDwithinPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomIntersection2dCollPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomIntersection2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomIntersects2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomIntersects3dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomIntersectsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomIsEmptyPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomLengthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomPerimeterPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomPointMake2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomPointMake3dzPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomShortestline2dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomShortestline3dPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomToGeogPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomTouchesPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/GeomUnaryUnionPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexCmpPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexEqPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexGePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexGtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexLePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexLtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexNePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/H3indexOutPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/IntspanLowerIncPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/IntspanLowerPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/IntspanUpperIncPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/IntspanUpperPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/IntspanWidthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbArrayElementTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbArrayLengthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbCmpPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbContainedPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbContainsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbEqPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbExistsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbGePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbGtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbLePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbLtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbNePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbPrettyPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/JsonbToCstringPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LeftTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LineInterpolatePointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LineLocatePointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LineNumpointsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LinePointNPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/LineSubstringPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MulTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/MultTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTcbufferGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTcbufferStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTfloatTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTgeoGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTgeoStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTintTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTnpointGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTnpointNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTnpointStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTnpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTposeGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTposePosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTposeStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTposeTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTrgeometryGeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OveraboveStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbackStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbackStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbackTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbelowStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverfrontStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinCellAreaPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinCellToParentPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinCmpPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinEqPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinGePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinGetResolutionPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinGtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinIsValidCellPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinLePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinLtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinNePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinPointToCellPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/QuadbinTileToCellPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/RightTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameStboxStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameStboxTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameTboxTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameTemporalTemporalPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameTnumberTboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameTspatialStboxPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SameTspatialTspatialPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxCmpPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxEqPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxGePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxGtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxLePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxLtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/StboxNePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubBigintTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubFloatTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubIntTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubTbigintBigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/SubTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TEqTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TEqTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TGeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TGeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TGtTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TGtTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TLeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TLeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TLtTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TLtTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TNeTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TNeTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TandBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TandTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TandTboolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TbigintScaleValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TbigintShiftValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TbigintToTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TbigintToTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TboolEndValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TboolStartValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TboolToTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TcbufferToTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTintIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TdistanceTposeTposePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalAtGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalCmpPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalEqPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalFrechetDistancePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalGePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalGtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalLePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalLtPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalMinusGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADIntScalarPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTFloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTIntPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalNePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TemporalRoundPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TeqBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TeqTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TextInitcapPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TextLowerPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TextUpperPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TextcatTextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TextcatTtextTextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TextcatTtextTtextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatCeilPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatExpPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatFloorPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatLnPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatLog10PhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatRadiansPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatScaleValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatShiftValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatToTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TfloatToTintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexCellToParentPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexGetResolutionPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexGridDistancePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexIsPentagonPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/Th3indexIsValidCellPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TintScaleValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TintShiftScaleValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TintShiftValuePhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TintToTbigintPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TintToTfloatPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TneBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TneTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TnotTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TnpointLengthPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TorBoolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TorTboolBoolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TorTboolTboolPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TpointLengthWkbPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TtextInitcapPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TtextLowerPhysicalFunction.cpp create mode 100644 nes-physical-operators/src/Functions/Meos/TtextUpperPhysicalFunction.cpp diff --git a/nes-logical-operators/include/Functions/Meos/AboveStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AboveStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..e9e7904164 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AboveStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event above_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `above_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AboveStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AboveStboxStbox"; + + AboveStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AboveStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AboveStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..8b1a0d27e2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AboveStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event above_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `above_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AboveStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AboveStboxTspatial"; + + AboveStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AboveTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AboveTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..f3c7a7d859 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AboveTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event above_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `above_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AboveTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AboveTspatialStbox"; + + AboveTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AboveTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AboveTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..fd9cc11434 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AboveTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event above_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `above_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AboveTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AboveTspatialTspatial"; + + AboveTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..e1817f4a51 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the geometry acontains the trgeometry instant. + */ +class AcontainsGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcontainsGeoTrgeometry"; + AcontainsGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..6c7277c016 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcontainsTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcontainsTcbufferGeo"; + + AcontainsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..79b0750b8d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcontainsTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcontainsTcbufferTcbuffer"; + + AcontainsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcontainsTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcontainsTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..ee83e195bc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcontainsTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcontainsTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcontainsTgeoGeo"; + + AcontainsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..fa92a524a4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcontainsTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcontainsTgeoTgeo"; + + AcontainsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..91a7b1ef3f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the geometry acovers the trgeometry instant. + */ +class AcoversGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversGeoTrgeometry"; + AcoversGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcoversTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..c640309ef7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcoversTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversTcbufferGeo"; + + AcoversTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..dbb7cc85a4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acovers_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcoversTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversTcbufferTcbuffer"; + + AcoversTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcoversTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..873549a883 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acovers_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcoversTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversTgeoGeo"; + + AcoversTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcoversTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..72223b7810 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acovers_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AcoversTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversTgeoTgeo"; + + AcoversTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..c7cea8a8de --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant acovers the geometry. + */ +class AcoversTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AcoversTrgeometryGeo"; + AcoversTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..eaf54c83f8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_bigint_tbigint: scalar bigint plus single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddBigintTbigint"; + + AddBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..ea9d07f61d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_float_tfloat: scalar float plus single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddFloatTfloat"; + + AddFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..2bec599667 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_int_tint: scalar int plus single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddIntTint"; + + AddIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..7144dff619 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_tbigint_bigint: single-instant tbigint plus scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddTbigintBigint"; + + AddTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..e2151445af --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_tfloat_float: single-instant tfloat plus scalar float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddTfloatFloat"; + + AddTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..2e7649dd0a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_tint_int: single-instant tint plus scalar int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddTintInt"; + + AddTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AddTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AddTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..b19369c45e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AddTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event add_tnumber_tnumber: two temporal numbers added (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `add_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AddTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AddTnumberTnumber"; + + AddTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..f391b6e4b1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdisjointTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTcbufferGeo"; + + AdisjointTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..8449c611ef --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdisjointTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTcbufferTcbuffer"; + + AdisjointTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdisjointTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..76f63e24e9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdisjointTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTgeoGeo"; + + AdisjointTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..c94664222b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdisjointTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTgeoTgeo"; + + AdisjointTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..3f3c6b12d3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant adisjoint the geometry. + */ +class AdisjointTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTrgeometryGeo"; + AdisjointTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..462102cf06 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the two trgeometry instants adisjoint. + */ +class AdisjointTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdisjointTrgeometryTrgeometry"; + AdisjointTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..4670c4d2b4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentStboxStbox"; + + AdjacentStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..be534cef0b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentStboxTspatial"; + + AdjacentStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..bb9fbcaf31 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentTboxTnumber"; + + AdjacentTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..fd9e746c21 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentTemporalTemporal"; + + AdjacentTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..373e40c41c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentTnumberTbox"; + + AdjacentTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..a48d7a941e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentTnumberTnumber"; + + AdjacentTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..e3a8a8e5d5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentTspatialStbox"; + + AdjacentTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..986ba425c2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adjacent_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adjacent_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdjacentTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdjacentTspatialTspatial"; + + AdjacentTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..e58d029e4c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always-within-distance between a single-instant tcbuffer and a static cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdwithinTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTcbufferCbuffer"; + + AdwithinTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..505d0ab245 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdwithinTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTcbufferGeo"; + + AdwithinTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..ad824b3afa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdwithinTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTcbufferTcbuffer"; + + AdwithinTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..16c2737d22 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTgeoGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdwithinTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTgeoGeo"; + + AdwithinTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..4ad94d8c49 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AdwithinTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTgeoTgeo"; + + AdwithinTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..287f9ef3ec --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant is within dist of the geometry (adwithin). + */ +class AdwithinTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTrgeometryGeo"; + AdwithinTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt, LogicalFunction dist); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..55e2cb4be7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the two trgeometry instants are within dist (adwithin). + */ +class AdwithinTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AdwithinTrgeometryTrgeometry"; + AdwithinTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2, LogicalFunction dist); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..77093850f6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterStboxStbox"; + + AfterStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..8472e1c860 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterStboxTspatial"; + + AfterStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..196e3b1eaf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterTboxTnumber"; + + AfterTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..52a4d6488f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterTemporalTemporal"; + + AfterTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..9931851536 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterTnumberTbox"; + + AfterTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..63083f1e21 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterTnumberTnumber"; + + AfterTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..250c77545a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterTspatialStbox"; + + AfterTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AfterTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AfterTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..5014cfeb0c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AfterTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event after_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `after_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AfterTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AfterTspatialTspatial"; + + AfterTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..da20f2ea06 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AintersectsTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTcbufferGeo"; + + AintersectsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..417adb9ef7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AintersectsTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTcbufferTcbuffer"; + + AintersectsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AintersectsTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..98a8445be3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AintersectsTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTgeoGeo"; + + AintersectsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..a6f23c20a5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AintersectsTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTgeoTgeo"; + + AintersectsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..ee35c37b1c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant aintersects the geometry. + */ +class AintersectsTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTrgeometryGeo"; + AintersectsTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..f8e7958ac8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the two trgeometry instants aintersects. + */ +class AintersectsTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AintersectsTrgeometryTrgeometry"; + AintersectsTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..dbd3859593 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_bigint_tbigint: always-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqBigintTbigint"; + + AlwaysEqBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..6d3ab29f89 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_bool_tbool: always-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqBoolTbool"; + + AlwaysEqBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..22a39e3031 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqFloatTfloat"; + + AlwaysEqFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..6ba9cb98d1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the static geometry is always equal to the 2D trgeometry instant. + */ +class AlwaysEqGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqGeoTrgeometry"; + + AlwaysEqGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..167005c3f1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqIntTint"; + + AlwaysEqIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..6e5a289a36 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eq npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_npoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqNpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqNpointTnpoint"; + + AlwaysEqNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.hpp new file mode 100644 index 0000000000..5c99ea8156 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eq pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_pose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqPoseTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqPoseTpose"; + + AlwaysEqPoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..db9b551a91 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tbigint_bigint: always-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTbigintBigint"; + + AlwaysEqTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..0d75fe3be3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tbool_bool: always-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTboolBool"; + + AlwaysEqTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..7a501bcf90 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTcbufferCbuffer"; + + AlwaysEqTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..e7ea5b5092 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTcbufferTcbuffer"; + + AlwaysEqTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..1c70136155 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTemporalTemporal"; + + AlwaysEqTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..f54c366edd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eqqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTextTtext"; + + AlwaysEqTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..b387463696 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTfloatFloat"; + + AlwaysEqTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..e7d31f06ad --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTgeoGeo"; + + AlwaysEqTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..ab2b7b4115 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTgeoTgeo"; + + AlwaysEqTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.hpp new file mode 100644 index 0000000000..090c3d06f3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always equal th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_th3index_h3index(temp, (H3Index)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTh3indexH3indexLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTh3indexH3index"; + + AlwaysEqTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..3459b6b2e2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_eq_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTintInt"; + + AlwaysEqTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.hpp new file mode 100644 index 0000000000..42a8ec0c6d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always equal tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tjsonb_jsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTjsonbJsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTjsonbJsonb"; + + AlwaysEqTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.hpp new file mode 100644 index 0000000000..906d23e14e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always equal tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tjsonb_tjsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTjsonbTjsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTjsonbTjsonb"; + + AlwaysEqTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.hpp new file mode 100644 index 0000000000..918dfd31bf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eq tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tnpoint_npoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTnpointNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTnpointNpoint"; + + AlwaysEqTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..30c4d9db23 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eq tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tnpoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTnpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTnpointTnpoint"; + + AlwaysEqTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTposePoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTposePoseLogicalFunction.hpp new file mode 100644 index 0000000000..bfe7f5328e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTposePoseLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eq tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tpose_pose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTposePoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTposePose"; + + AlwaysEqTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.hpp new file mode 100644 index 0000000000..7765ebfd85 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eq tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tpose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTposeTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTposeTpose"; + + AlwaysEqTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.hpp new file mode 100644 index 0000000000..5334d32e7d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always equal tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_tquadbin_quadbin(temp, (Quadbin)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTquadbinQuadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTquadbinQuadbin"; + + AlwaysEqTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..54cf4ac351 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the 2D trgeometry instant is always equal to the static geometry. + */ +class AlwaysEqTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTrgeometryGeo"; + + AlwaysEqTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..d4c94d1d96 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the two 2D trgeometry instants are always equal. + */ +class AlwaysEqTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTrgeometryTrgeometry"; + + AlwaysEqTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysEqTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysEqTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..3a7b5590a2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysEqTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always eqqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_eq_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysEqTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysEqTtextText"; + + AlwaysEqTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..04ae2bae4c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_bigint_tbigint: always-greater-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeBigintTbigint"; + + AlwaysGeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..04d533be22 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeFloatTfloat"; + + AlwaysGeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..880b127a6d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeIntTint"; + + AlwaysGeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..a1440b0264 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_tbigint_bigint: always-greater-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeTbigintBigint"; + + AlwaysGeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..da84c3d031 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeTemporalTemporal"; + + AlwaysGeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..d905179dab --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always gequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeTextTtext"; + + AlwaysGeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..53040fe727 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeTfloatFloat"; + + AlwaysGeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..431496ef6b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ge_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeTintInt"; + + AlwaysGeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..00c95ae97b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always gequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ge_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGeTtextText"; + + AlwaysGeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..349c9fb44c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_bigint_tbigint: always-greater-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtBigintTbigint"; + + AlwaysGtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..39b1e99d3e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtFloatTfloat"; + + AlwaysGtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..57a8be02db --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtIntTint"; + + AlwaysGtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..307e268055 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_tbigint_bigint: always-greater-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtTbigintBigint"; + + AlwaysGtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..603b4c77eb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtTemporalTemporal"; + + AlwaysGtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..3043bd6c92 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always gtqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtTextTtext"; + + AlwaysGtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..3fd1138b41 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtTfloatFloat"; + + AlwaysGtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..cc101be767 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_gt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtTintInt"; + + AlwaysGtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysGtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysGtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..bc481f2e42 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysGtTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always gtqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_gt_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysGtTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysGtTtextText"; + + AlwaysGtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..7375a28d46 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_bigint_tbigint: always-less-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeBigintTbigint"; + + AlwaysLeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..528abb2930 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeFloatTfloat"; + + AlwaysLeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..acbcfbcb06 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeIntTint"; + + AlwaysLeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..fc3b11a60b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_tbigint_bigint: always-less-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeTbigintBigint"; + + AlwaysLeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..28d2a1e6fc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeTemporalTemporal"; + + AlwaysLeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..24af55e855 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always lequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeTextTtext"; + + AlwaysLeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..e834d3ce4f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeTfloatFloat"; + + AlwaysLeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..6b71e37649 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_le_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeTintInt"; + + AlwaysLeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..e98a7298c4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always lequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_le_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLeTtextText"; + + AlwaysLeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..fca1374134 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_bigint_tbigint: always-less-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtBigintTbigint"; + + AlwaysLtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..3acf224145 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtFloatTfloat"; + + AlwaysLtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..2e8b47001b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtIntTint"; + + AlwaysLtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..8651b9e588 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_tbigint_bigint: always-less-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtTbigintBigint"; + + AlwaysLtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..c63c170d6b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtTemporalTemporal"; + + AlwaysLtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..9a1f2044bd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ltqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtTextTtext"; + + AlwaysLtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..fde09bad63 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtTfloatFloat"; + + AlwaysLtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..00f5a7d07c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_lt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtTintInt"; + + AlwaysLtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysLtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysLtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..c071ba5eb2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysLtTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ltqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_lt_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysLtTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysLtTtextText"; + + AlwaysLtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..410c1e4201 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_bigint_tbigint: always-not-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeBigintTbigint"; + + AlwaysNeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..19c95e0dfb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_bool_tbool: always-not-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeBoolTbool"; + + AlwaysNeBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..58c5cf03c8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeFloatTfloat"; + + AlwaysNeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..a2e6f94997 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the static geometry is always not equal to the 2D trgeometry instant. + */ +class AlwaysNeGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeGeoTrgeometry"; + + AlwaysNeGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..3555412761 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeIntTint"; + + AlwaysNeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..93d0c94205 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ne npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_npoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeNpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeNpointTnpoint"; + + AlwaysNeNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNePoseTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNePoseTposeLogicalFunction.hpp new file mode 100644 index 0000000000..1a2a384b04 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNePoseTposeLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ne pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_pose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNePoseTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNePoseTpose"; + + AlwaysNePoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..62af9cc317 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tbigint_bigint: always-not-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTbigintBigint"; + + AlwaysNeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..596a37edd6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tbool_bool: always-not-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTboolBool"; + + AlwaysNeTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..1d07566870 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTcbufferCbuffer"; + + AlwaysNeTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..7b22671185 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTcbufferTcbuffer"; + + AlwaysNeTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..160ea8e137 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTemporalTemporal"; + + AlwaysNeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..3318c6034e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always nequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTextTtext"; + + AlwaysNeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..aba33bef94 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTfloatFloat"; + + AlwaysNeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..df7efbc02e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTgeoGeo"; + + AlwaysNeTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..a6c8d709bf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTgeoTgeo"; + + AlwaysNeTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.hpp new file mode 100644 index 0000000000..b8cb963b73 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always neual th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_th3index_h3index(temp, (H3Index)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTh3indexH3indexLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTh3indexH3index"; + + AlwaysNeTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..a04cf39997 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event always_ne_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTintInt"; + + AlwaysNeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.hpp new file mode 100644 index 0000000000..2767706e8a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always neual tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tjsonb_jsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTjsonbJsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTjsonbJsonb"; + + AlwaysNeTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.hpp new file mode 100644 index 0000000000..74d3562dad --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always neual tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tjsonb_tjsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTjsonbTjsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTjsonbTjsonb"; + + AlwaysNeTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.hpp new file mode 100644 index 0000000000..aa750014b0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ne tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tnpoint_npoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTnpointNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTnpointNpoint"; + + AlwaysNeTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..2640d712a5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ne tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tnpoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTnpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTnpointTnpoint"; + + AlwaysNeTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTposePoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTposePoseLogicalFunction.hpp new file mode 100644 index 0000000000..32651c5bf7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTposePoseLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ne tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tpose_pose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTposePoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTposePose"; + + AlwaysNeTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.hpp new file mode 100644 index 0000000000..b1bde9b498 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always ne tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tpose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTposeTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTposeTpose"; + + AlwaysNeTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.hpp new file mode 100644 index 0000000000..5f9844c53c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always neual tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_tquadbin_quadbin(temp, (Quadbin)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTquadbinQuadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTquadbinQuadbin"; + + AlwaysNeTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..ede9a4ef9f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the 2D trgeometry instant is always not equal to the static geometry. + */ +class AlwaysNeTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTrgeometryGeo"; + + AlwaysNeTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..7a8ff6f177 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the two 2D trgeometry instants are always not equal. + */ +class AlwaysNeTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTrgeometryTrgeometry"; + + AlwaysNeTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AlwaysNeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AlwaysNeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..d769c64c63 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AlwaysNeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Always nequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `always_ne_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AlwaysNeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AlwaysNeTtextText"; + + AlwaysNeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..6035781953 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AtouchesTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTcbufferGeo"; + + AtouchesTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..e03e2255c9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AtouchesTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTcbufferTcbuffer"; + + AtouchesTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AtouchesTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..de85dd84ae --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AtouchesTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTgeoGeo"; + + AtouchesTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..81cf445eea --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AtouchesTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTgeoTgeo"; + + AtouchesTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AtouchesTpointGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTpointGeoLogicalFunction.hpp new file mode 100644 index 0000000000..781f14b7ac --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTpointGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tpoint_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tpoint_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class AtouchesTpointGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTpointGeo"; + + AtouchesTpointGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..c680d3c810 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant atouches the geometry. + */ +class AtouchesTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "AtouchesTrgeometryGeo"; + AtouchesTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BackStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BackStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..03b8df9dcf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BackStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event back_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `back_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BackStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BackStboxStbox"; + + BackStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BackStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BackStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..5355f71df0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BackStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event back_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `back_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BackStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BackStboxTspatial"; + + BackStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BackTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BackTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..f8142845e4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BackTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event back_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `back_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BackTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BackTspatialStbox"; + + BackTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BackTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BackTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..f4535df60e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BackTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event back_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `back_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BackTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BackTspatialTspatial"; + + BackTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..d351026d37 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeStboxStbox"; + + BeforeStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..a4c577be0f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeStboxTspatial"; + + BeforeStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..45d7824440 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeTboxTnumber"; + + BeforeTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..8f5ab6ad69 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeTemporalTemporal"; + + BeforeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..fc72d71ba8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeTnumberTbox"; + + BeforeTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..be81fa76e5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeTnumberTnumber"; + + BeforeTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..df5551e4aa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeTspatialStbox"; + + BeforeTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BeforeTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BeforeTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..fa4057293c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BeforeTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event before_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `before_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BeforeTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BeforeTspatialTspatial"; + + BeforeTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BelowStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BelowStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..22fa7b23bf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BelowStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event below_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `below_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BelowStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BelowStboxStbox"; + + BelowStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BelowStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BelowStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..a5c4b3db8e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BelowStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event below_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `below_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BelowStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BelowStboxTspatial"; + + BelowStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BelowTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BelowTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..56a00e15d6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BelowTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event below_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `below_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BelowTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BelowTspatialStbox"; + + BelowTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/BelowTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/BelowTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..6f88282f03 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/BelowTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event below_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `below_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class BelowTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "BelowTspatialTspatial"; + + BelowTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedFloatSpanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedFloatSpanLogicalFunction.hpp new file mode 100644 index 0000000000..cda1cd42db --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedFloatSpanLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Float contained in span + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_float_span(arg0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedFloatSpanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedFloatSpan"; + + ContainedFloatSpanLogicalFunction(LogicalFunction arg0, + LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedFloatspanSpanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedFloatspanSpanLogicalFunction.hpp new file mode 100644 index 0000000000..9b8b3808e3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedFloatspanSpanLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan contained in floatspan + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_span_span(temp, sp0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedFloatspanSpanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedFloatspanSpan"; + + ContainedFloatspanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedIntSpanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedIntSpanLogicalFunction.hpp new file mode 100644 index 0000000000..b79bd794cf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedIntSpanLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Int contained in span + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_int_span((int)arg0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedIntSpanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedIntSpan"; + + ContainedIntSpanLogicalFunction(LogicalFunction arg0, + LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedSpanSpanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedSpanSpanLogicalFunction.hpp new file mode 100644 index 0000000000..5526e7341b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedSpanSpanLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan contained in intspan + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_span_span(temp, sp0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedSpanSpanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedSpanSpan"; + + ContainedSpanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..6abe46f97b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedStboxStbox"; + + ContainedStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..2cd9105bd4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedStboxTspatial"; + + ContainedStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..55d3dab133 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedTboxTnumber"; + + ContainedTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..22471ed886 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedTemporalTemporal"; + + ContainedTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..57d81cb131 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedTnumberTbox"; + + ContainedTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..f2955f8b91 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedTnumberTnumber"; + + ContainedTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..d9b0ab2f00 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedTspatialStbox"; + + ContainedTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainedTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainedTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..0c7867276a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainedTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contained_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contained_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainedTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainedTspatialTspatial"; + + ContainedTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsFloatspanSpanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsFloatspanSpanLogicalFunction.hpp new file mode 100644 index 0000000000..8576c0bab9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsFloatspanSpanLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan contains floatspan + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_span_span(temp, sp0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsFloatspanSpanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsFloatspanSpan"; + + ContainsFloatspanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsSpanFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsSpanFloatLogicalFunction.hpp new file mode 100644 index 0000000000..4ad803e85c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsSpanFloatLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan contains float + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_span_float(temp, arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsSpanFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsSpanFloat"; + + ContainsSpanFloatLogicalFunction(LogicalFunction sp, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsSpanIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsSpanIntLogicalFunction.hpp new file mode 100644 index 0000000000..aa54d93a74 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsSpanIntLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan contains int + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_span_int(temp, (int)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsSpanIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsSpanInt"; + + ContainsSpanIntLogicalFunction(LogicalFunction sp, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsSpanSpanLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsSpanSpanLogicalFunction.hpp new file mode 100644 index 0000000000..c1a2c4b01c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsSpanSpanLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan contains intspan + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_span_span(temp, sp0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsSpanSpanLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsSpanSpan"; + + ContainsSpanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..5e0e79828b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsStboxStbox"; + + ContainsStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..64914182df --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsStboxTspatial"; + + ContainsStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..00de11c685 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsTboxTnumber"; + + ContainsTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..7da5cbef31 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsTemporalTemporal"; + + ContainsTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..e93b2d8571 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsTnumberTbox"; + + ContainsTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..3243edc2cb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsTnumberTnumber"; + + ContainsTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..3838c8d566 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsTspatialStbox"; + + ContainsTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/ContainsTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/ContainsTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..303c8d09fb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/ContainsTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event contains_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `contains_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class ContainsTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "ContainsTspatialTspatial"; + + ContainsTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..569aa82cb7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_bigint_tbigint: scalar bigint divided by single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivBigintTbigint"; + + DivBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..0b96e9c5bf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_float_tfloat: scalar float divided by single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivFloatTfloat"; + + DivFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..1b8f76111e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_int_tint: scalar int divided by single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivIntTint"; + + DivIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..c44a1f77ba --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_tbigint_bigint: single-instant tbigint divided by scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivTbigintBigint"; + + DivTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..361a8b8d30 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_tfloat_float: single-instant tfloat divided by scalar float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivTfloatFloat"; + + DivTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..59c8d8ce88 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_tint_int: single-instant tint divided by scalar int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivTintInt"; + + DivTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/DivTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/DivTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..8f10d02a61 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/DivTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event div_tnumber_tnumber: two temporal numbers divided (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `div_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class DivTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "DivTnumberTnumber"; + + DivTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..d01f720c41 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the geometry econtains the trgeometry instant. + */ +class EcontainsGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcontainsGeoTrgeometry"; + EcontainsGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..9894847c38 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcontainsTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcontainsTcbufferGeo"; + + EcontainsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..432758cb28 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcontainsTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcontainsTcbufferTcbuffer"; + + EcontainsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcontainsTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcontainsTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..40a10422ba --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcontainsTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcontainsTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcontainsTgeoGeo"; + + EcontainsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..64d6a43fde --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcontainsTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcontainsTgeoTgeo"; + + EcontainsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..ffc2bd6998 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the geometry ecovers the trgeometry instant. + */ +class EcoversGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversGeoTrgeometry"; + EcoversGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcoversTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..965445b4d7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcoversTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversTcbufferGeo"; + + EcoversTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..6f23805465 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcoversTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversTcbufferTcbuffer"; + + EcoversTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcoversTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..98c2403a1a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcoversTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversTgeoGeo"; + + EcoversTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcoversTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..08a54066dc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EcoversTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversTgeoTgeo"; + + EcoversTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..46b6bf5d38 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant ecovers the geometry. + */ +class EcoversTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EcoversTrgeometryGeo"; + EcoversTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..74ae5734fd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdisjointTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTcbufferGeo"; + + EdisjointTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..4a71b644b3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdisjointTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTcbufferTcbuffer"; + + EdisjointTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdisjointTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..5b78fdafef --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdisjointTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTgeoGeo"; + + EdisjointTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..b90e19071b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdisjointTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTgeoTgeo"; + + EdisjointTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..1f15fa17a8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant edisjoint the geometry. + */ +class EdisjointTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTrgeometryGeo"; + EdisjointTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..83f2cb872a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the two trgeometry instants edisjoint. + */ +class EdisjointTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdisjointTrgeometryTrgeometry"; + EdisjointTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..d7f03c9776 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever-within-distance between a single-instant tcbuffer and a static cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdwithinTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTcbufferCbuffer"; + + EdwithinTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..057ef6025e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdwithinTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTcbufferGeo"; + + EdwithinTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..3b755d67ca --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdwithinTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTcbufferTcbuffer"; + + EdwithinTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..d86ee4b828 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTgeoGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdwithinTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTgeoGeo"; + + EdwithinTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..bbc5b36e2f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EdwithinTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTgeoTgeo"; + + EdwithinTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..dd36398d9f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant is within dist of the geometry (edwithin). + */ +class EdwithinTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTrgeometryGeo"; + EdwithinTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt, LogicalFunction dist); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..90f69ce170 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the two trgeometry instants are within dist (edwithin). + */ +class EdwithinTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EdwithinTrgeometryTrgeometry"; + EdwithinTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2, LogicalFunction dist); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..8f732af7c5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EintersectsTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTcbufferGeo"; + + EintersectsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..a76443de3e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EintersectsTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTcbufferTcbuffer"; + + EintersectsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EintersectsTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..abc4b0da3c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EintersectsTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTgeoGeo"; + + EintersectsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..a854e6cd29 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EintersectsTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTgeoTgeo"; + + EintersectsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..ac902e0d3b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant eintersects the geometry. + */ +class EintersectsTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTrgeometryGeo"; + EintersectsTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..d1ce2acd78 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the two trgeometry instants eintersects. + */ +class EintersectsTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EintersectsTrgeometryTrgeometry"; + EintersectsTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..a45e2ce58e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EtouchesTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTcbufferGeo"; + + EtouchesTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..4d8294bd15 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EtouchesTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTcbufferTcbuffer"; + + EtouchesTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EtouchesTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..1bcf1c061a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EtouchesTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTgeoGeo"; + + EtouchesTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..9dbe993868 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EtouchesTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTgeoTgeo"; + + EtouchesTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EtouchesTpointGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTpointGeoLogicalFunction.hpp new file mode 100644 index 0000000000..88f1f2ec70 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTpointGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tpoint_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tpoint_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EtouchesTpointGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTpointGeo"; + + EtouchesTpointGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..001a81fc78 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1 if the trgeometry instant etouches the geometry. + */ +class EtouchesTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EtouchesTrgeometryGeo"; + EtouchesTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt); + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..6f25077fcd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_bigint_tbigint: ever-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqBigintTbigint"; + + EverEqBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..cb41d7e03e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_bool_tbool: ever-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqBoolTbool"; + + EverEqBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..25a221f64d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqFloatTfloat"; + + EverEqFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..5a49a6f0f8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the static geometry is ever equal to the 2D trgeometry instant. + */ +class EverEqGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqGeoTrgeometry"; + + EverEqGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..e6c1013352 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqIntTint"; + + EverEqIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqNpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqNpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..9f47efa8fa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqNpointTnpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eq npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_npoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqNpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqNpointTnpoint"; + + EverEqNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqPoseTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqPoseTposeLogicalFunction.hpp new file mode 100644 index 0000000000..746bb5e789 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqPoseTposeLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eq pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_pose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqPoseTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqPoseTpose"; + + EverEqPoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..b4e5d700c4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tbigint_bigint: ever-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTbigintBigint"; + + EverEqTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..f2f77f084b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tbool_bool: ever-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTboolBool"; + + EverEqTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..9fbf9e7bed --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTcbufferCbuffer"; + + EverEqTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..671180845c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTcbufferTcbuffer"; + + EverEqTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..45f8bb2b47 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTemporalTemporal"; + + EverEqTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..0216b03d57 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eqqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTextTtext"; + + EverEqTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..d3490e8f16 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTfloatFloat"; + + EverEqTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..44dcbfabbc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTgeoGeo"; + + EverEqTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..82aa74383f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTgeoTgeo"; + + EverEqTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.hpp new file mode 100644 index 0000000000..b8736c0731 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever equal th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_th3index_h3index(temp, (H3Index)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTh3indexH3indexLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTh3indexH3index"; + + EverEqTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..d7747e40e2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_eq_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTintInt"; + + EverEqTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.hpp new file mode 100644 index 0000000000..d6bb1408bd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever equal tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tjsonb_jsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTjsonbJsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTjsonbJsonb"; + + EverEqTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.hpp new file mode 100644 index 0000000000..38d45b5a1c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever equal tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tjsonb_tjsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTjsonbTjsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTjsonbTjsonb"; + + EverEqTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTnpointNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTnpointNpointLogicalFunction.hpp new file mode 100644 index 0000000000..a2bcecbc91 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTnpointNpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eq tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tnpoint_npoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTnpointNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTnpointNpoint"; + + EverEqTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTnpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTnpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..0aa48d93d2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTnpointTnpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eq tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tnpoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTnpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTnpointTnpoint"; + + EverEqTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTposePoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTposePoseLogicalFunction.hpp new file mode 100644 index 0000000000..9dd8ba6e85 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTposePoseLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eq tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tpose_pose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTposePoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTposePose"; + + EverEqTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTposeTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTposeTposeLogicalFunction.hpp new file mode 100644 index 0000000000..3a2ffa32c9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTposeTposeLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eq tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tpose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTposeTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTposeTpose"; + + EverEqTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.hpp new file mode 100644 index 0000000000..74d70c6c91 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever equal tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_tquadbin_quadbin(temp, (Quadbin)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTquadbinQuadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTquadbinQuadbin"; + + EverEqTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..6aa7993550 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the 2D trgeometry instant is ever equal to the static geometry. + */ +class EverEqTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTrgeometryGeo"; + + EverEqTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..14e66d2256 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the two 2D trgeometry instants are ever equal. + */ +class EverEqTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTrgeometryTrgeometry"; + + EverEqTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverEqTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverEqTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..80ec7f2a3e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverEqTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever eqqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_eq_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverEqTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverEqTtextText"; + + EverEqTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..80ac070a64 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_bigint_tbigint: ever-greater-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeBigintTbigint"; + + EverGeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..87a0682df0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeFloatTfloat"; + + EverGeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..6b3c2a399a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeIntTint"; + + EverGeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..b460ae1d3b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_tbigint_bigint: ever-greater-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeTbigintBigint"; + + EverGeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..9e07dbb3c6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeTemporalTemporal"; + + EverGeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..f35a39c8f9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever gequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeTextTtext"; + + EverGeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..aa52031d27 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeTfloatFloat"; + + EverGeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..52502d40c2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ge_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeTintInt"; + + EverGeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..0eb53cdfe9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever gequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ge_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGeTtextText"; + + EverGeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..d11813643c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_bigint_tbigint: ever-greater-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtBigintTbigint"; + + EverGtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..9df0aebe0b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtFloatTfloat"; + + EverGtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..d3888ce6c0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtIntTint"; + + EverGtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..29ca63285c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_tbigint_bigint: ever-greater-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtTbigintBigint"; + + EverGtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..8542f11352 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtTemporalTemporal"; + + EverGtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..1a56b6c444 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever gtqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtTextTtext"; + + EverGtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..f65d911801 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtTfloatFloat"; + + EverGtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..4748624bba --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_gt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtTintInt"; + + EverGtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverGtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverGtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..96ae0cd3ea --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverGtTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever gtqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_gt_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverGtTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverGtTtextText"; + + EverGtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..789702f694 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_bigint_tbigint: ever-less-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeBigintTbigint"; + + EverLeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..545828a4b9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeFloatTfloat"; + + EverLeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..3e7c72aaf8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeIntTint"; + + EverLeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..1c0c3c003c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_tbigint_bigint: ever-less-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeTbigintBigint"; + + EverLeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..c18097d4e4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeTemporalTemporal"; + + EverLeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..f267236979 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever lequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeTextTtext"; + + EverLeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..6a2fec5763 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeTfloatFloat"; + + EverLeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..4c45c091fb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_le_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeTintInt"; + + EverLeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..af606e91cb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever lequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_le_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLeTtextText"; + + EverLeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..25efa90486 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_bigint_tbigint: ever-less-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtBigintTbigint"; + + EverLtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..eec7d64cf5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtFloatTfloat"; + + EverLtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..06a28988e8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtIntTint"; + + EverLtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..6d9a71981a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_tbigint_bigint: ever-less-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtTbigintBigint"; + + EverLtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..54245430b1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtTemporalTemporal"; + + EverLtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..fd70270644 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ltqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtTextTtext"; + + EverLtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..984fe83fd2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtTfloatFloat"; + + EverLtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..6f23db6ee3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_lt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtTintInt"; + + EverLtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverLtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverLtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..f7b4974b0d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverLtTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ltqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_lt_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverLtTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverLtTtextText"; + + EverLtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..3140edc831 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_bigint_tbigint: ever-not-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeBigintTbigint"; + + EverNeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..bd0cbee62a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_bool_tbool: ever-not-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeBoolTbool"; + + EverNeBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..e4e5d4c095 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeFloatTfloat"; + + EverNeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..b398288d1a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the static geometry is ever not equal to the 2D trgeometry instant. + */ +class EverNeGeoTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeGeoTrgeometry"; + + EverNeGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..98534dcca5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeIntTint"; + + EverNeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeNpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeNpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..9e7b7b2fdc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeNpointTnpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ne npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_npoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeNpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeNpointTnpoint"; + + EverNeNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNePoseTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNePoseTposeLogicalFunction.hpp new file mode 100644 index 0000000000..b0914226a9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNePoseTposeLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ne pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_pose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNePoseTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNePoseTpose"; + + EverNePoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..697669868d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tbigint_bigint: ever-not-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTbigintBigint"; + + EverNeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..c9bf31fde6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tbool_bool: ever-not-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTboolBool"; + + EverNeTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..6c0374823f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTcbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTcbufferCbuffer"; + + EverNeTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..855204b2fa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTcbufferTcbuffer"; + + EverNeTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..dcb2b40366 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTemporalTemporal"; + + EverNeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..d0412c6926 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever nequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTextTtext"; + + EverNeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..7533cdd788 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTfloatFloat"; + + EverNeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..1314fdefe1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTgeoGeo"; + + EverNeTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..9fcbb8e89d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTgeoTgeo"; + + EverNeTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.hpp new file mode 100644 index 0000000000..cf8ad6962d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever neual th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_th3index_h3index(temp, (H3Index)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTh3indexH3indexLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTh3indexH3index"; + + EverNeTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..8f17d8e9de --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ever_ne_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTintInt"; + + EverNeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.hpp new file mode 100644 index 0000000000..56648e4c75 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever neual tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tjsonb_jsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTjsonbJsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTjsonbJsonb"; + + EverNeTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.hpp new file mode 100644 index 0000000000..915ca33e1d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever neual tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tjsonb_tjsonb`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTjsonbTjsonbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTjsonbTjsonb"; + + EverNeTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTnpointNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTnpointNpointLogicalFunction.hpp new file mode 100644 index 0000000000..919905eff6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTnpointNpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ne tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tnpoint_npoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTnpointNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTnpointNpoint"; + + EverNeTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTnpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTnpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..a406d973b9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTnpointTnpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ne tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tnpoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTnpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTnpointTnpoint"; + + EverNeTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTposePoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTposePoseLogicalFunction.hpp new file mode 100644 index 0000000000..6a23adb8c4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTposePoseLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ne tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tpose_pose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTposePoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTposePose"; + + EverNeTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTposeTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTposeTposeLogicalFunction.hpp new file mode 100644 index 0000000000..0725f63790 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTposeTposeLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever ne tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tpose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTposeTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTposeTpose"; + + EverNeTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.hpp new file mode 100644 index 0000000000..c4b17bf2a1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever neual tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_tquadbin_quadbin(temp, (Quadbin)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTquadbinQuadbinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTquadbinQuadbin"; + + EverNeTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..1cd767f548 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the 2D trgeometry instant is ever not equal to the static geometry. + */ +class EverNeTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTrgeometryGeo"; + + EverNeTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..100e057f87 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns 1.0 if the two 2D trgeometry instants are ever not equal. + */ +class EverNeTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTrgeometryTrgeometry"; + + EverNeTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/EverNeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/EverNeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..daee596d77 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/EverNeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Ever nequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ever_ne_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class EverNeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "EverNeTtextText"; + + EverNeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FloatspanLowerIncLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FloatspanLowerIncLogicalFunction.hpp new file mode 100644 index 0000000000..dffbe83073 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FloatspanLowerIncLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan lower_inc + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `span_lower_inc`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FloatspanLowerIncLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FloatspanLowerInc"; + + FloatspanLowerIncLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FloatspanLowerLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FloatspanLowerLogicalFunction.hpp new file mode 100644 index 0000000000..dcd89aa356 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FloatspanLowerLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan lower + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `floatspan_lower`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FloatspanLowerLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FloatspanLower"; + + FloatspanLowerLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FloatspanUpperIncLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FloatspanUpperIncLogicalFunction.hpp new file mode 100644 index 0000000000..98e3a307cd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FloatspanUpperIncLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan upper_inc + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `span_upper_inc`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FloatspanUpperIncLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FloatspanUpperInc"; + + FloatspanUpperIncLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FloatspanUpperLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FloatspanUpperLogicalFunction.hpp new file mode 100644 index 0000000000..79e5c9ef4c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FloatspanUpperLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan upper + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `floatspan_upper`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FloatspanUpperLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FloatspanUpper"; + + FloatspanUpperLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FloatspanWidthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FloatspanWidthLogicalFunction.hpp new file mode 100644 index 0000000000..0e456e107e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FloatspanWidthLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Floatspan width + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `floatspan_width`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FloatspanWidthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FloatspanWidth"; + + FloatspanWidthLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FrontStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FrontStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..15005c812c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FrontStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event front_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `front_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FrontStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FrontStboxStbox"; + + FrontStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FrontStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FrontStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..356afcecd8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FrontStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event front_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `front_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FrontStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FrontStboxTspatial"; + + FrontStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FrontTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FrontTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..21da493a1f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FrontTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event front_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `front_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FrontTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FrontTspatialStbox"; + + FrontTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/FrontTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/FrontTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..c1cfe74388 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/FrontTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event front_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `front_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class FrontTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "FrontTspatialTspatial"; + + FrontTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoAsEwktLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoAsEwktLogicalFunction.hpp new file mode 100644 index 0000000000..9b1c1972be --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoAsEwktLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry as EWKT + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_as_ewkt(temp, (int)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoAsEwktLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoAsEwkt"; + + GeoAsEwktLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoAsGeojsonLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoAsGeojsonLogicalFunction.hpp new file mode 100644 index 0000000000..813fd9afb9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoAsGeojsonLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry as GeoJSON + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_as_geojson(temp, (int)arg0, (int)arg1, nullptr)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoAsGeojsonLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoAsGeojson"; + + GeoAsGeojsonLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoEqualsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoEqualsLogicalFunction.hpp new file mode 100644 index 0000000000..70accaacc7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoEqualsLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry equals + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_equals`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoEqualsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoEquals"; + + GeoEqualsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoGeoNLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoGeoNLogicalFunction.hpp new file mode 100644 index 0000000000..08139e2bfb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoGeoNLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Nth geometry in collection + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_geo_n(temp, (int)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoGeoNLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoGeoN"; + + GeoGeoNLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoIsUnitaryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoIsUnitaryLogicalFunction.hpp new file mode 100644 index 0000000000..ec91c885cc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoIsUnitaryLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Is geometry unitary + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_is_unitary`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoIsUnitaryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoIsUnitary"; + + GeoIsUnitaryLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoNumGeosLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoNumGeosLogicalFunction.hpp new file mode 100644 index 0000000000..602142e08b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoNumGeosLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Count geometry components + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_num_geos`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoNumGeosLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoNumGeos"; + + GeoNumGeosLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoNumPointsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoNumPointsLogicalFunction.hpp new file mode 100644 index 0000000000..4000821c02 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoNumPointsLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Count geometry points + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_num_points`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoNumPointsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoNumPoints"; + + GeoNumPointsLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoPointsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoPointsLogicalFunction.hpp new file mode 100644 index 0000000000..4636df0598 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoPointsLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry geo points + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_points`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoPointsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoPoints"; + + GeoPointsLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoReverseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoReverseLogicalFunction.hpp new file mode 100644 index 0000000000..aeb15e5819 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoReverseLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry geo reverse + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_reverse`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoReverseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoReverse"; + + GeoReverseLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoRoundLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoRoundLogicalFunction.hpp new file mode 100644 index 0000000000..14a889cf76 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoRoundLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Round geometry coordinates + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_round(temp, (int)dec)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoRoundLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoRound"; + + GeoRoundLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoSameLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoSameLogicalFunction.hpp new file mode 100644 index 0000000000..43c0885d56 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoSameLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry same + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_same`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoSameLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoSame"; + + GeoSameLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoSetSridLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoSetSridLogicalFunction.hpp new file mode 100644 index 0000000000..60d2f600e0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoSetSridLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Set geometry SRID + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_set_srid(temp, (int32_t)srid)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoSetSridLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoSetSrid"; + + GeoSetSridLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoSridLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoSridLogicalFunction.hpp new file mode 100644 index 0000000000..40a3cfc22e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoSridLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Get geometry SRID + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_srid`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoSridLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoSrid"; + + GeoSridLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeoTransformLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeoTransformLogicalFunction.hpp new file mode 100644 index 0000000000..714784ca69 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeoTransformLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Transform geometry SRID + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geo_transform(temp, (int32_t)srid)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeoTransformLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeoTransform"; + + GeoTransformLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogAreaLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogAreaLogicalFunction.hpp new file mode 100644 index 0000000000..34846d23f3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogAreaLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geog area + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_area`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogAreaLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogArea"; + + GeogAreaLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogCentroidLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogCentroidLogicalFunction.hpp new file mode 100644 index 0000000000..dbcbd99b8d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogCentroidLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geography centroid + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_centroid(temp, (bool)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogCentroidLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogCentroid"; + + GeogCentroidLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogDistanceLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogDistanceLogicalFunction.hpp new file mode 100644 index 0000000000..3bca90b76e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogDistanceLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geography distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_distance`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogDistanceLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogDistance"; + + GeogDistanceLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogDwithinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogDwithinLogicalFunction.hpp new file mode 100644 index 0000000000..b93b74a894 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogDwithinLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geog_dwithin with distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_dwithin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogDwithinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogDwithin"; + + GeogDwithinLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogIntersectsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogIntersectsLogicalFunction.hpp new file mode 100644 index 0000000000..343ba18a90 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogIntersectsLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geography intersects + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_intersects`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogIntersectsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogIntersects"; + + GeogIntersectsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogLengthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogLengthLogicalFunction.hpp new file mode 100644 index 0000000000..149a2b89db --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogLengthLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geog length + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_length`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogLengthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogLength"; + + GeogLengthLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogPerimeterLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogPerimeterLogicalFunction.hpp new file mode 100644 index 0000000000..06287b06f6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogPerimeterLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geog perimeter + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_perimeter`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogPerimeterLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogPerimeter"; + + GeogPerimeterLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogPointMake2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogPointMake2dLogicalFunction.hpp new file mode 100644 index 0000000000..3638f28364 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogPointMake2dLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Make 2D geography point + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geogpoint_make2d((int32_t)srid, x, y)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogPointMake2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogPointMake2d"; + + GeogPointMake2dLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogPointMake3dzLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogPointMake3dzLogicalFunction.hpp new file mode 100644 index 0000000000..6401d04286 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogPointMake3dzLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Make 3D geography point + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geogpoint_make3dz((int32_t)srid, x, y, z)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogPointMake3dzLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogPointMake3dz"; + + GeogPointMake3dzLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y, + LogicalFunction z); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeogToGeomLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeogToGeomLogicalFunction.hpp new file mode 100644 index 0000000000..a4aa4d4694 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeogToGeomLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geog to geom + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geog_to_geom`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeogToGeomLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeogToGeom"; + + GeogToGeomLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomAzimuthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomAzimuthLogicalFunction.hpp new file mode 100644 index 0000000000..899697361b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomAzimuthLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry azimuth (single point) + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_azimuth`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomAzimuthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomAzimuth"; + + GeomAzimuthLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomBoundaryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomBoundaryLogicalFunction.hpp new file mode 100644 index 0000000000..07ad30c864 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomBoundaryLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry geom boundary + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_boundary`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomBoundaryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomBoundary"; + + GeomBoundaryLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomCentroidLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomCentroidLogicalFunction.hpp new file mode 100644 index 0000000000..630cf9cb75 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomCentroidLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry geom centroid + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_centroid`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomCentroidLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomCentroid"; + + GeomCentroidLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomContainsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomContainsLogicalFunction.hpp new file mode 100644 index 0000000000..c46c05282e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomContainsLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry contains + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_contains`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomContainsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomContains"; + + GeomContainsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomConvexHullLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomConvexHullLogicalFunction.hpp new file mode 100644 index 0000000000..b55e77ddd3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomConvexHullLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry geom convex hull + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_convex_hull`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomConvexHullLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomConvexHull"; + + GeomConvexHullLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomCoversLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomCoversLogicalFunction.hpp new file mode 100644 index 0000000000..1cfa200cf2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomCoversLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry covers + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_covers`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomCoversLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomCovers"; + + GeomCoversLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDifference2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDifference2dLogicalFunction.hpp new file mode 100644 index 0000000000..cff048a237 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDifference2dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_difference2d + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_difference2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDifference2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDifference2d"; + + GeomDifference2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDisjoint2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDisjoint2dLogicalFunction.hpp new file mode 100644 index 0000000000..fb7538e47e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDisjoint2dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry disjoint 2D + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_disjoint2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDisjoint2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDisjoint2d"; + + GeomDisjoint2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDistance2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDistance2dLogicalFunction.hpp new file mode 100644 index 0000000000..8a840a4f0d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDistance2dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry 2D distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_distance2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDistance2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDistance2d"; + + GeomDistance2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDistance3dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDistance3dLogicalFunction.hpp new file mode 100644 index 0000000000..d911358b90 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDistance3dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry 3D distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_distance3d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDistance3dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDistance3d"; + + GeomDistance3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDwithin2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDwithin2dLogicalFunction.hpp new file mode 100644 index 0000000000..4520cdaf07 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDwithin2dLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_dwithin2d with distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_dwithin2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDwithin2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDwithin2d"; + + GeomDwithin2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDwithin3dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDwithin3dLogicalFunction.hpp new file mode 100644 index 0000000000..1d76d6621f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDwithin3dLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_dwithin3d with distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_dwithin3d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDwithin3dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDwithin3d"; + + GeomDwithin3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomDwithinLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomDwithinLogicalFunction.hpp new file mode 100644 index 0000000000..961eadeca9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomDwithinLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_dwithin with distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_dwithin`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomDwithinLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomDwithin"; + + GeomDwithinLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomIntersection2dCollLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomIntersection2dCollLogicalFunction.hpp new file mode 100644 index 0000000000..1cbb7bc219 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomIntersection2dCollLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_intersection2d_coll + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_intersection2d_coll`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomIntersection2dCollLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomIntersection2dColl"; + + GeomIntersection2dCollLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomIntersection2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomIntersection2dLogicalFunction.hpp new file mode 100644 index 0000000000..4a7aee2a4e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomIntersection2dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_intersection2d + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_intersection2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomIntersection2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomIntersection2d"; + + GeomIntersection2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomIntersects2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomIntersects2dLogicalFunction.hpp new file mode 100644 index 0000000000..4d721c4ead --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomIntersects2dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry intersects 2D + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_intersects2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomIntersects2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomIntersects2d"; + + GeomIntersects2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomIntersects3dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomIntersects3dLogicalFunction.hpp new file mode 100644 index 0000000000..747b5cfbc0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomIntersects3dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry intersects 3D + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_intersects3d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomIntersects3dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomIntersects3d"; + + GeomIntersects3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomIntersectsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomIntersectsLogicalFunction.hpp new file mode 100644 index 0000000000..5509359d5a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomIntersectsLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry intersects + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_intersects`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomIntersectsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomIntersects"; + + GeomIntersectsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomIsEmptyLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomIsEmptyLogicalFunction.hpp new file mode 100644 index 0000000000..f2b26a3118 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomIsEmptyLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Is geometry empty + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_is_empty`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomIsEmptyLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomIsEmpty"; + + GeomIsEmptyLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomLengthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomLengthLogicalFunction.hpp new file mode 100644 index 0000000000..e4ed77bb97 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomLengthLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry length + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_length`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomLengthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomLength"; + + GeomLengthLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomPerimeterLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomPerimeterLogicalFunction.hpp new file mode 100644 index 0000000000..d42b40f28d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomPerimeterLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry perimeter + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_perimeter`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomPerimeterLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomPerimeter"; + + GeomPerimeterLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomPointMake2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomPointMake2dLogicalFunction.hpp new file mode 100644 index 0000000000..1a1be2f5ed --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomPointMake2dLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Make 2D geometry point + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geompoint_make2d((int32_t)srid, x, y)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomPointMake2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomPointMake2d"; + + GeomPointMake2dLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomPointMake3dzLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomPointMake3dzLogicalFunction.hpp new file mode 100644 index 0000000000..df1cffcb09 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomPointMake3dzLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Make 3D geometry point + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geompoint_make3dz((int32_t)srid, x, y, z)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomPointMake3dzLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomPointMake3dz"; + + GeomPointMake3dzLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y, + LogicalFunction z); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomShortestline2dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomShortestline2dLogicalFunction.hpp new file mode 100644 index 0000000000..785cc40655 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomShortestline2dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_shortestline2d + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_shortestline2d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomShortestline2dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomShortestline2d"; + + GeomShortestline2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomShortestline3dLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomShortestline3dLogicalFunction.hpp new file mode 100644 index 0000000000..6186721263 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomShortestline3dLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom_shortestline3d + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_shortestline3d`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomShortestline3dLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomShortestline3d"; + + GeomShortestline3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomToGeogLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomToGeogLogicalFunction.hpp new file mode 100644 index 0000000000..d80183f1af --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomToGeogLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief geom to geog + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_to_geog`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomToGeogLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomToGeog"; + + GeomToGeogLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomTouchesLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomTouchesLogicalFunction.hpp new file mode 100644 index 0000000000..a6355492d9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomTouchesLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry touches + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_touches`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomTouchesLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomTouches"; + + GeomTouchesLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/GeomUnaryUnionLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/GeomUnaryUnionLogicalFunction.hpp new file mode 100644 index 0000000000..3112c5b30b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/GeomUnaryUnionLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Geometry geom unary union + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `geom_unary_union`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class GeomUnaryUnionLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "GeomUnaryUnion"; + + GeomUnaryUnionLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexCmpLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexCmpLogicalFunction.hpp new file mode 100644 index 0000000000..a0d459f773 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexCmpLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index comparison (cmp) + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_cmp((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexCmpLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexCmp"; + + H3indexCmpLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexEqLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexEqLogicalFunction.hpp new file mode 100644 index 0000000000..fcaa3f28e4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexEqLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index eq comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_eq((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexEqLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexEq"; + + H3indexEqLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexGeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexGeLogicalFunction.hpp new file mode 100644 index 0000000000..b888c9cdcb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexGeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index ge comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_ge((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexGeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexGe"; + + H3indexGeLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexGtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexGtLogicalFunction.hpp new file mode 100644 index 0000000000..2f9c5263f3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexGtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index gt comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_gt((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexGtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexGt"; + + H3indexGtLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexLeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexLeLogicalFunction.hpp new file mode 100644 index 0000000000..bea424d909 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexLeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index le comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_le((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexLeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexLe"; + + H3indexLeLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexLtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexLtLogicalFunction.hpp new file mode 100644 index 0000000000..e8d5b60283 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexLtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index lt comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_lt((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexLtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexLt"; + + H3indexLtLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexNeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexNeLogicalFunction.hpp new file mode 100644 index 0000000000..554ff35ffd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexNeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index ne comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_ne((H3Index)a, (H3Index)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexNeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexNe"; + + H3indexNeLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/H3indexOutLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/H3indexOutLogicalFunction.hpp new file mode 100644 index 0000000000..356f679ee0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/H3indexOutLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief H3Index to hex string + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `h3index_out((H3Index)cell)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class H3indexOutLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "H3indexOut"; + + H3indexOutLogicalFunction(LogicalFunction cell); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/IntspanLowerIncLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntspanLowerIncLogicalFunction.hpp new file mode 100644 index 0000000000..1fb96a6f66 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/IntspanLowerIncLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan lower_inc + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `span_lower_inc`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class IntspanLowerIncLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "IntspanLowerInc"; + + IntspanLowerIncLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/IntspanLowerLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntspanLowerLogicalFunction.hpp new file mode 100644 index 0000000000..242341c2b7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/IntspanLowerLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan lower + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `intspan_lower`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class IntspanLowerLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "IntspanLower"; + + IntspanLowerLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/IntspanUpperIncLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntspanUpperIncLogicalFunction.hpp new file mode 100644 index 0000000000..3361711769 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/IntspanUpperIncLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan upper_inc + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `span_upper_inc`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class IntspanUpperIncLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "IntspanUpperInc"; + + IntspanUpperIncLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/IntspanUpperLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntspanUpperLogicalFunction.hpp new file mode 100644 index 0000000000..fc6d064e79 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/IntspanUpperLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan upper + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `intspan_upper`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class IntspanUpperLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "IntspanUpper"; + + IntspanUpperLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/IntspanWidthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/IntspanWidthLogicalFunction.hpp new file mode 100644 index 0000000000..d28067889d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/IntspanWidthLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Intspan width + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `intspan_width`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class IntspanWidthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "IntspanWidth"; + + IntspanWidthLogicalFunction(LogicalFunction sp); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbArrayElementTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbArrayElementTextLogicalFunction.hpp new file mode 100644 index 0000000000..be1897f50c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbArrayElementTextLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb array element text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_array_element_text(temp, (int)idx_d)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbArrayElementTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbArrayElementText"; + + JsonbArrayElementTextLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbArrayLengthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbArrayLengthLogicalFunction.hpp new file mode 100644 index 0000000000..aeeb448bab --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbArrayLengthLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb array length + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_array_length(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbArrayLengthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbArrayLength"; + + JsonbArrayLengthLogicalFunction(LogicalFunction jb); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbCmpLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbCmpLogicalFunction.hpp new file mode 100644 index 0000000000..47233c566c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbCmpLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb cmp + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_cmp(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbCmpLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbCmp"; + + JsonbCmpLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbContainedLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbContainedLogicalFunction.hpp new file mode 100644 index 0000000000..c9369d9b4c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbContainedLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb contained + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_contained(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbContainedLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbContained"; + + JsonbContainedLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbContainsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbContainsLogicalFunction.hpp new file mode 100644 index 0000000000..26025f70cb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbContainsLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb contains + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_contains(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbContainsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbContains"; + + JsonbContainsLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbEqLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbEqLogicalFunction.hpp new file mode 100644 index 0000000000..718b0a4dee --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbEqLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb eq comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_eq(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbEqLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbEq"; + + JsonbEqLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbExistsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbExistsLogicalFunction.hpp new file mode 100644 index 0000000000..1916b94960 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbExistsLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb exists key + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_exists(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbExistsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbExists"; + + JsonbExistsLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbGeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbGeLogicalFunction.hpp new file mode 100644 index 0000000000..2f557168e2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbGeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb ge comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_ge(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbGeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbGe"; + + JsonbGeLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbGtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbGtLogicalFunction.hpp new file mode 100644 index 0000000000..a86b73b613 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbGtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb gt comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_gt(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbGtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbGt"; + + JsonbGtLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbLeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbLeLogicalFunction.hpp new file mode 100644 index 0000000000..e8d32e1ddc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbLeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb le comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_le(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbLeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbLe"; + + JsonbLeLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbLtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbLtLogicalFunction.hpp new file mode 100644 index 0000000000..e74b0e7ea3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbLtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb lt comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_lt(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbLtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbLt"; + + JsonbLtLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbNeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbNeLogicalFunction.hpp new file mode 100644 index 0000000000..920f29d630 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbNeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb ne comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_ne(temp, jb0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbNeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbNe"; + + JsonbNeLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbObjectFieldTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbObjectFieldTextLogicalFunction.hpp new file mode 100644 index 0000000000..650b003fe7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbObjectFieldTextLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb object field text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_object_field_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbObjectFieldTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbObjectFieldText"; + + JsonbObjectFieldTextLogicalFunction(LogicalFunction jb, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbPrettyLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbPrettyLogicalFunction.hpp new file mode 100644 index 0000000000..45cb8330b7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbPrettyLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb pretty print + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_pretty(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbPrettyLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbPretty"; + + JsonbPrettyLogicalFunction(LogicalFunction jb); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/JsonbToCstringLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/JsonbToCstringLogicalFunction.hpp new file mode 100644 index 0000000000..4bf634f76a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/JsonbToCstringLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Jsonb to cstring + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `jsonb_to_cstring(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class JsonbToCstringLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "JsonbToCstring"; + + JsonbToCstringLogicalFunction(LogicalFunction jb); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..0dc2cdfe3e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftStboxStbox"; + + LeftStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..6f72c9f3b1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftStboxTspatial"; + + LeftStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..1d8cc44928 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftTboxTnumber"; + + LeftTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..0706a4a8a4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftTnumberTbox"; + + LeftTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..5e0659001e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftTnumberTnumber"; + + LeftTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..22c04794dc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftTspatialStbox"; + + LeftTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LeftTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LeftTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..fa90332b4c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LeftTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event left_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `left_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LeftTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LeftTspatialTspatial"; + + LeftTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LineInterpolatePointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LineInterpolatePointLogicalFunction.hpp new file mode 100644 index 0000000000..98750b9407 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LineInterpolatePointLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Interpolate point on line + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `line_interpolate_point(temp, arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LineInterpolatePointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LineInterpolatePoint"; + + LineInterpolatePointLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LineLocatePointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LineLocatePointLogicalFunction.hpp new file mode 100644 index 0000000000..9b695d3b53 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LineLocatePointLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Locate point on line + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `line_locate_point`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LineLocatePointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LineLocatePoint"; + + LineLocatePointLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LineNumpointsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LineNumpointsLogicalFunction.hpp new file mode 100644 index 0000000000..bd08951ee3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LineNumpointsLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Line num points + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `line_numpoints(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LineNumpointsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LineNumpoints"; + + LineNumpointsLogicalFunction(LogicalFunction wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LinePointNLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LinePointNLogicalFunction.hpp new file mode 100644 index 0000000000..418a6e7373 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LinePointNLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Nth point on line + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `line_point_n(temp, (int)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LinePointNLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LinePointN"; + + LinePointNLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/LineSubstringLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/LineSubstringLogicalFunction.hpp new file mode 100644 index 0000000000..509ecafd92 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/LineSubstringLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Line substring + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `line_substring(temp, arg0, arg1)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class LineSubstringLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "LineSubstring"; + + LineSubstringLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..2dfb27a1d7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event minimum distance between two tcbuffer instants within threshold. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mindistance_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MindistanceTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MindistanceTcbufferTcbuffer"; + + MindistanceTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..dda2b203f7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_bigint_tbigint: scalar bigint times single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulBigintTbigint"; + + MulBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..8e05bb526b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_float_tfloat: scalar float times single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulFloatTfloat"; + + MulFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..5b0aebcbd2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_int_tint: scalar int times single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulIntTint"; + + MulIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..b8d7c9747d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_tbigint_bigint: single-instant tbigint times scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulTbigintBigint"; + + MulTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..036f59927b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_tfloat_float: single-instant tfloat times scalar float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulTfloatFloat"; + + MulTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..2f2dcc0165 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_tint_int: single-instant tint times scalar int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulTintInt"; + + MulTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MulTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MulTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..3d531a8599 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MulTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_tnumber_tnumber: two temporal numbers multiplied (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MulTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MulTnumberTnumber"; + + MulTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/MultTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/MultTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..1434ed7124 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/MultTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event mul_tnumber_tnumber over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `mul_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class MultTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "MultTnumberTnumber"; + + MultTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..c1c4dd0ebd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_stbox_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadStboxStbox"; + + NadStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTcbufferGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTcbufferGeoLogicalFunction.hpp new file mode 100644 index 0000000000..ba018ede7c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTcbufferGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nearest approach distance between tcbuffer and static geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTcbufferGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTcbufferGeo"; + + NadTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTcbufferStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTcbufferStboxLogicalFunction.hpp new file mode 100644 index 0000000000..c768fc950e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTcbufferStboxLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tcbuffer_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTcbufferStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTcbufferStbox"; + + NadTcbufferStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..066f2570dc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nearest approach distance between two tcbuffer instants. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTcbufferTcbuffer"; + + NadTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTfloatTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTfloatTboxLogicalFunction.hpp new file mode 100644 index 0000000000..b96b1998fb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTfloatTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tfloat_tbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tfloat_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTfloatTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTfloatTbox"; + + NadTfloatTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTgeoGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTgeoGeoLogicalFunction.hpp new file mode 100644 index 0000000000..334c148438 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTgeoGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nearest approach distance between tgeo and static geometry. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTgeoGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTgeoGeo"; + + NadTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTgeoStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTgeoStboxLogicalFunction.hpp new file mode 100644 index 0000000000..9a1df388e0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTgeoStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTgeoStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTgeoStbox"; + + NadTgeoStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..9a40dfa0b6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nearest approach distance between two tgeo instants. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTgeoTgeo"; + + NadTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTintTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTintTboxLogicalFunction.hpp new file mode 100644 index 0000000000..7b19501cb7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTintTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tint_tbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tint_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTintTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTintTbox"; + + NadTintTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTnpointGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTnpointGeoLogicalFunction.hpp new file mode 100644 index 0000000000..091279c99c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTnpointGeoLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief NAD tnpoint vs geo + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tnpoint_geo(temp, gs0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTnpointGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTnpointGeo"; + + NadTnpointGeoLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTnpointNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTnpointNpointLogicalFunction.hpp new file mode 100644 index 0000000000..c61e967e1c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTnpointNpointLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief NAD tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tnpoint_npoint(temp, np0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTnpointNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTnpointNpoint"; + + NadTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTnpointStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTnpointStboxLogicalFunction.hpp new file mode 100644 index 0000000000..4f599e89a7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTnpointStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tnpoint_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tnpoint_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTnpointStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTnpointStbox"; + + NadTnpointStboxLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTnpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTnpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..0eeeb0dca7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTnpointTnpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief NAD tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tnpoint_tnpoint(temp, inst0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTnpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTnpointTnpoint"; + + NadTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTposeGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTposeGeoLogicalFunction.hpp new file mode 100644 index 0000000000..f15e1ee98e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTposeGeoLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief NAD tpose vs geo + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tpose_geo(temp, gs0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTposeGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTposeGeo"; + + NadTposeGeoLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTposePoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTposePoseLogicalFunction.hpp new file mode 100644 index 0000000000..302a3414aa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTposePoseLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief NAD tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tpose_pose(temp, pose0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTposePoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTposePose"; + + NadTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTposeStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTposeStboxLogicalFunction.hpp new file mode 100644 index 0000000000..a8b6219e03 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTposeStboxLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tpose_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tpose_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTposeStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTposeStbox"; + + NadTposeStboxLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTposeTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTposeTposeLogicalFunction.hpp new file mode 100644 index 0000000000..29a6d5f74f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTposeTposeLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief NAD tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tpose_tpose(temp, inst0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class NadTposeTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTposeTpose"; + + NadTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTrgeometryGeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTrgeometryGeoLogicalFunction.hpp new file mode 100644 index 0000000000..f64aba7e86 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTrgeometryGeoLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns the nearest approach distance between a 2D trgeometry instant and a static geometry. + */ +class NadTrgeometryGeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTrgeometryGeo"; + + NadTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.hpp new file mode 100644 index 0000000000..59906eb1d9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Returns the nearest approach distance between two 2D trgeometry instants. + */ +class NadTrgeometryTrgeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "NadTrgeometryTrgeometry"; + + NadTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OveraboveStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OveraboveStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..3c6e3b5d1e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OveraboveStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overabove_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overabove_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OveraboveStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OveraboveStboxStbox"; + + OveraboveStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OveraboveStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OveraboveStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..720889312a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OveraboveStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overabove_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overabove_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OveraboveStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OveraboveStboxTspatial"; + + OveraboveStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OveraboveTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OveraboveTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..7a0761a0ae --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OveraboveTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overabove_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overabove_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OveraboveTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OveraboveTspatialStbox"; + + OveraboveTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..3feeaf20ba --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overabove_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overabove_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OveraboveTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OveraboveTspatialTspatial"; + + OveraboveTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..e1eac976c4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterStboxStbox"; + + OverafterStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..7c0efb4581 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterStboxTspatial"; + + OverafterStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..0a69fb4f90 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterTboxTnumber"; + + OverafterTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..05b6a71377 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterTemporalTemporal"; + + OverafterTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..11b3c856f8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterTnumberTbox"; + + OverafterTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..cd732f473f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterTnumberTnumber"; + + OverafterTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..e2e739421a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterTspatialStbox"; + + OverafterTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverafterTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverafterTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..16ba5e23a0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverafterTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overafter_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overafter_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverafterTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverafterTspatialTspatial"; + + OverafterTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbackStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbackStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..5d1ba2afbc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbackStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overback_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overback_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbackStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbackStboxStbox"; + + OverbackStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbackStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbackStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..8488972558 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbackStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overback_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overback_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbackStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbackStboxTspatial"; + + OverbackStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbackTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbackTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..470dc7035e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbackTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overback_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overback_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbackTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbackTspatialStbox"; + + OverbackTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbackTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbackTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..33877d6f1a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbackTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overback_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overback_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbackTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbackTspatialTspatial"; + + OverbackTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..5d47a426da --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeStboxStbox"; + + OverbeforeStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..7f6a52330b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeStboxTspatial"; + + OverbeforeStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..48c32f76c0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeTboxTnumber"; + + OverbeforeTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..4c7084b43f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeTemporalTemporal"; + + OverbeforeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..12c3ebda58 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeTnumberTbox"; + + OverbeforeTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..ebd43cf9b7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeTnumberTnumber"; + + OverbeforeTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..7ab083c6f2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeTspatialStbox"; + + OverbeforeTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..376dbfd08d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbefore_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbefore_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbeforeTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbeforeTspatialTspatial"; + + OverbeforeTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbelowStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbelowStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..481d077b82 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbelowStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbelow_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbelow_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbelowStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbelowStboxStbox"; + + OverbelowStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbelowStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbelowStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..2babcf17e1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbelowStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbelow_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbelow_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbelowStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbelowStboxTspatial"; + + OverbelowStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbelowTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbelowTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..e0bcee2895 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbelowTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbelow_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbelow_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbelowTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbelowTspatialStbox"; + + OverbelowTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..f9f2ad335f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overbelow_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overbelow_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverbelowTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverbelowTspatialTspatial"; + + OverbelowTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverfrontStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverfrontStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..949b3d31f2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverfrontStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overfront_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overfront_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverfrontStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverfrontStboxStbox"; + + OverfrontStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverfrontStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverfrontStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..41bb9764ea --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverfrontStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overfront_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overfront_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverfrontStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverfrontStboxTspatial"; + + OverfrontStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverfrontTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverfrontTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..e0c1562ffa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverfrontTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overfront_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overfront_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverfrontTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverfrontTspatialStbox"; + + OverfrontTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..4b820c4fc2 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overfront_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overfront_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverfrontTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverfrontTspatialTspatial"; + + OverfrontTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..aec7d0f60e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsStboxStbox"; + + OverlapsStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..e5f1dc6554 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsStboxTspatial"; + + OverlapsStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..6d16f87b38 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsTboxTnumber"; + + OverlapsTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..ad7419e76e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsTemporalTemporal"; + + OverlapsTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..1b9bd356fe --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsTnumberTbox"; + + OverlapsTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..d6214f3f54 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsTnumberTnumber"; + + OverlapsTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..95243b725f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsTspatialStbox"; + + OverlapsTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..39ba4c5069 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overlaps_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overlaps_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverlapsTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverlapsTspatialTspatial"; + + OverlapsTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..8480346e2c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftStboxStbox"; + + OverleftStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..6732155198 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftStboxTspatial"; + + OverleftStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..57965de8c3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftTboxTnumber"; + + OverleftTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..ada5504fe6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftTnumberTbox"; + + OverleftTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..d004440666 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftTnumberTnumber"; + + OverleftTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..fb66b4bc89 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftTspatialStbox"; + + OverleftTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverleftTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverleftTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..8ce1f743bb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverleftTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overleft_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overleft_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverleftTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverleftTspatialTspatial"; + + OverleftTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..d4a9057aaa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightStboxStbox"; + + OverrightStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..fc3d8a2de1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightStboxTspatial"; + + OverrightStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..6550c9d3b7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightTboxTnumber"; + + OverrightTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..783122083c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightTnumberTbox"; + + OverrightTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..3452879bb8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightTnumberTnumber"; + + OverrightTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..47f3a4f242 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightTspatialStbox"; + + OverrightTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/OverrightTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/OverrightTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..79227d602d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/OverrightTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event overright_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `overright_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class OverrightTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "OverrightTspatialTspatial"; + + OverrightTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinCellAreaLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinCellAreaLogicalFunction.hpp new file mode 100644 index 0000000000..6cb2cdbcb9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinCellAreaLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin cell area + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_cell_area((Quadbin)cell)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinCellAreaLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinCellArea"; + + QuadbinCellAreaLogicalFunction(LogicalFunction cell); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinCellToParentLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinCellToParentLogicalFunction.hpp new file mode 100644 index 0000000000..064e04c7cb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinCellToParentLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin cell to parent + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_cell_to_parent((Quadbin)cell, (uint32_t)res)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinCellToParentLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinCellToParent"; + + QuadbinCellToParentLogicalFunction(LogicalFunction cell, + LogicalFunction res); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.hpp new file mode 100644 index 0000000000..85b81d9282 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin cell to quadkey + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_cell_to_quadkey((Quadbin)cell)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinCellToQuadkeyLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinCellToQuadkey"; + + QuadbinCellToQuadkeyLogicalFunction(LogicalFunction cell); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinCmpLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinCmpLogicalFunction.hpp new file mode 100644 index 0000000000..47215d13ec --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinCmpLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin cmp + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_cmp((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinCmpLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinCmp"; + + QuadbinCmpLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinEqLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinEqLogicalFunction.hpp new file mode 100644 index 0000000000..b308739708 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinEqLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin eq comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_eq((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinEqLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinEq"; + + QuadbinEqLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinGeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinGeLogicalFunction.hpp new file mode 100644 index 0000000000..fc7d0dd70e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinGeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin ge comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_ge((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinGeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinGe"; + + QuadbinGeLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinGetResolutionLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinGetResolutionLogicalFunction.hpp new file mode 100644 index 0000000000..572db1225f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinGetResolutionLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin get resolution + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_get_resolution((Quadbin)cell)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinGetResolutionLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinGetResolution"; + + QuadbinGetResolutionLogicalFunction(LogicalFunction cell); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinGtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinGtLogicalFunction.hpp new file mode 100644 index 0000000000..849a6e8829 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinGtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin gt comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_gt((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinGtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinGt"; + + QuadbinGtLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinIsValidCellLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinIsValidCellLogicalFunction.hpp new file mode 100644 index 0000000000..e461ca8a9d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinIsValidCellLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin is valid cell + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_is_valid_cell((Quadbin)cell)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinIsValidCellLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinIsValidCell"; + + QuadbinIsValidCellLogicalFunction(LogicalFunction cell); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinLeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinLeLogicalFunction.hpp new file mode 100644 index 0000000000..c63b7e7d99 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinLeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin le comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_le((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinLeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinLe"; + + QuadbinLeLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinLtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinLtLogicalFunction.hpp new file mode 100644 index 0000000000..2c81b3c68b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinLtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin lt comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_lt((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinLtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinLt"; + + QuadbinLtLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinNeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinNeLogicalFunction.hpp new file mode 100644 index 0000000000..9dfa21de5e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinNeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin ne comparison + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_ne((Quadbin)a, (Quadbin)b)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinNeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinNe"; + + QuadbinNeLogicalFunction(LogicalFunction a, + LogicalFunction b); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinPointToCellLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinPointToCellLogicalFunction.hpp new file mode 100644 index 0000000000..eac624a910 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinPointToCellLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin point to cell + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_point_to_cell(lon, lat, (uint32_t)res)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinPointToCellLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinPointToCell"; + + QuadbinPointToCellLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction res); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/QuadbinTileToCellLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/QuadbinTileToCellLogicalFunction.hpp new file mode 100644 index 0000000000..0abf2b20df --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/QuadbinTileToCellLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Quadbin tile to cell + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `quadbin_tile_to_cell((uint32_t)x, (uint32_t)y, (uint32_t)z)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class QuadbinTileToCellLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "QuadbinTileToCell"; + + QuadbinTileToCellLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction z); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..1163503de0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightStboxStbox"; + + RightStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..50b53a1ffd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightStboxTspatial"; + + RightStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..4433b8729b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightTboxTnumber"; + + RightTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..e3648e9139 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightTnumberTbox"; + + RightTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..e8684a3c1f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightTnumberTnumber"; + + RightTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..1f5a05b82a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightTspatialStbox"; + + RightTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/RightTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/RightTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..6e5c495ca9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/RightTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event right_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `right_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class RightTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "RightTspatialTspatial"; + + RightTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameStboxStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameStboxStboxLogicalFunction.hpp new file mode 100644 index 0000000000..f981bba5e4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameStboxStboxLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_stbox_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameStboxStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameStboxStbox"; + + SameStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameStboxTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameStboxTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..dd18f43145 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameStboxTspatialLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_stbox_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameStboxTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameStboxTspatial"; + + SameStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameTboxTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameTboxTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..2f2a2acd78 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameTboxTnumberLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_tbox_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameTboxTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameTboxTnumber"; + + SameTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameTemporalTemporalLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameTemporalTemporalLogicalFunction.hpp new file mode 100644 index 0000000000..b149adac01 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameTemporalTemporalLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_temporal_temporal`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameTemporalTemporalLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameTemporalTemporal"; + + SameTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameTnumberTboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameTnumberTboxLogicalFunction.hpp new file mode 100644 index 0000000000..735be722c7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameTnumberTboxLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_tnumber_tbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameTnumberTboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameTnumberTbox"; + + SameTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..e71588b392 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameTnumberTnumber"; + + SameTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameTspatialStboxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameTspatialStboxLogicalFunction.hpp new file mode 100644 index 0000000000..fc615265dd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameTspatialStboxLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_tspatial_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameTspatialStboxLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameTspatialStbox"; + + SameTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SameTspatialTspatialLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SameTspatialTspatialLogicalFunction.hpp new file mode 100644 index 0000000000..8b668060ef --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SameTspatialTspatialLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event same_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `same_tspatial_tspatial`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SameTspatialTspatialLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SameTspatialTspatial"; + + SameTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxCmpLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxCmpLogicalFunction.hpp new file mode 100644 index 0000000000..f287ca2739 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxCmpLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_cmp comparison. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_cmp`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxCmpLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxCmp"; + + StboxCmpLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxEqLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxEqLogicalFunction.hpp new file mode 100644 index 0000000000..b372012b82 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxEqLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_eq predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_eq`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxEqLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxEq"; + + StboxEqLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxGeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxGeLogicalFunction.hpp new file mode 100644 index 0000000000..78705a9feb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxGeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_ge predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_ge`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxGeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxGe"; + + StboxGeLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxGtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxGtLogicalFunction.hpp new file mode 100644 index 0000000000..1557b27abc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxGtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_gt predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_gt`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxGtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxGt"; + + StboxGtLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxLeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxLeLogicalFunction.hpp new file mode 100644 index 0000000000..94e6d8093b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxLeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_le predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_le`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxLeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxLe"; + + StboxLeLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxLtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxLtLogicalFunction.hpp new file mode 100644 index 0000000000..bbe0f2c1e0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxLtLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_lt predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_lt`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxLtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxLt"; + + StboxLtLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/StboxNeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/StboxNeLogicalFunction.hpp new file mode 100644 index 0000000000..817af7f77e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/StboxNeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event stbox_ne predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `stbox_ne`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class StboxNeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "StboxNe"; + + StboxNeLogicalFunction(LogicalFunction box, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubBigintTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubBigintTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..1bcaf5d1a6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubBigintTbigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_bigint_tbigint: scalar bigint minus single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_bigint_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubBigintTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubBigintTbigint"; + + SubBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubFloatTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubFloatTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..4a31429c37 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubFloatTfloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_float_tfloat: scalar float minus single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_float_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubFloatTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubFloatTfloat"; + + SubFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubIntTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubIntTintLogicalFunction.hpp new file mode 100644 index 0000000000..778d784e9d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubIntTintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_int_tint: scalar int minus single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_int_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubIntTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubIntTint"; + + SubIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubTbigintBigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubTbigintBigintLogicalFunction.hpp new file mode 100644 index 0000000000..21c669aae9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubTbigintBigintLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_tbigint_bigint: single-instant tbigint minus scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_tbigint_bigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubTbigintBigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubTbigintBigint"; + + SubTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..6e57654eae --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_tfloat_float: single-instant tfloat minus scalar float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubTfloatFloat"; + + SubTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..4927dba90e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_tint_int: single-instant tint minus scalar int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubTintInt"; + + SubTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/SubTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/SubTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..46619f61fa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/SubTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event sub_tnumber_tnumber: two temporal numbers subtracted (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `sub_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class SubTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "SubTnumberTnumber"; + + SubTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TEqTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TEqTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..476c0ed8f1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TEqTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal eqqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TEqTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TEqTextTtext"; + + TEqTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TEqTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TEqTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..b8c82f691f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TEqTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal eqqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TEqTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TEqTtextText"; + + TEqTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TGeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TGeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..33b36d0741 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TGeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal ge text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TGeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TGeTextTtext"; + + TGeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TGeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TGeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..4965a1a3c0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TGeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal ge ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tge_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TGeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TGeTtextText"; + + TGeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TGtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TGtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..a0d34e9471 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TGtTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal gt text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TGtTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TGtTextTtext"; + + TGtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TGtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TGtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..68eb471e81 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TGtTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal gt ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgt_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TGtTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TGtTtextText"; + + TGtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TLeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TLeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..182fe3eccf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TLeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal le text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TLeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TLeTextTtext"; + + TLeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TLeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TLeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..62513fc42a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TLeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal le ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tle_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TLeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TLeTtextText"; + + TLeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TLtTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TLtTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..36c99ddfa9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TLtTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal lt text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TLtTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TLtTextTtext"; + + TLtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TLtTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TLtTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..18e9f55fb7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TLtTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal lt ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tlt_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TLtTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TLtTtextText"; + + TLtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TNeTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TNeTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..df4c7de807 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TNeTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal nequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TNeTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TNeTextTtext"; + + TNeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TNeTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TNeTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..252fe2b046 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TNeTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal nequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TNeTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TNeTtextText"; + + TNeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TandBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TandBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..1f826f50ca --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TandBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tand_bool_tbool: temporal AND of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tand_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TandBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TandBoolTbool"; + + TandBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TandTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TandTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..0fca5bbe69 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TandTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tand_tbool_bool: temporal AND of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tand_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TandTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TandTboolBool"; + + TandTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TandTboolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TandTboolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..7c449afd49 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TandTboolTboolLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tand_tbool_tbool: temporal AND of two tbool values (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tand_tbool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TandTboolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TandTboolTbool"; + + TandTboolTboolLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TbigintScaleValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TbigintScaleValueLogicalFunction.hpp new file mode 100644 index 0000000000..1927f797b6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TbigintScaleValueLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbigint_scale_value: scale single-instant tbigint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbigint_scale_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TbigintScaleValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TbigintScaleValue"; + + TbigintScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TbigintShiftScaleValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TbigintShiftScaleValueLogicalFunction.hpp new file mode 100644 index 0000000000..265d68beeb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TbigintShiftScaleValueLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbigint_shift_scale_value: shift then scale single-instant tbigint value. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbigint_shift_scale_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TbigintShiftScaleValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TbigintShiftScaleValue"; + + TbigintShiftScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TbigintShiftValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TbigintShiftValueLogicalFunction.hpp new file mode 100644 index 0000000000..ecbd021107 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TbigintShiftValueLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbigint_shift_value: shift single-instant tbigint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbigint_shift_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TbigintShiftValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TbigintShiftValue"; + + TbigintShiftValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TbigintToTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TbigintToTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..9023a8bf83 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TbigintToTfloatLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbigint_to_tfloat: convert single-instant tbigint to tfloat. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbigint_to_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TbigintToTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TbigintToTfloat"; + + TbigintToTfloatLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TbigintToTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TbigintToTintLogicalFunction.hpp new file mode 100644 index 0000000000..80a961d5af --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TbigintToTintLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbigint_to_tint: convert single-instant tbigint to tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbigint_to_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TbigintToTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TbigintToTint"; + + TbigintToTintLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TboolEndValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TboolEndValueLogicalFunction.hpp new file mode 100644 index 0000000000..e8f9916aa7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TboolEndValueLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbool_end_value. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbool_end_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TboolEndValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TboolEndValue"; + + TboolEndValueLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TboolStartValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TboolStartValueLogicalFunction.hpp new file mode 100644 index 0000000000..63272ca591 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TboolStartValueLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbool_start_value. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbool_start_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TboolStartValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TboolStartValue"; + + TboolStartValueLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TboolToTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TboolToTintLogicalFunction.hpp new file mode 100644 index 0000000000..edaadef42e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TboolToTintLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tbool_to_tint: convert single-instant tbool to tint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tbool_to_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TboolToTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TboolToTint"; + + TboolToTintLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TcbufferToTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TcbufferToTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..26471ebaf7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TcbufferToTfloatLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tcbuffer_to_tfloat radius extraction. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tcbuffer_to_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TcbufferToTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TcbufferToTfloat"; + + TcbufferToTfloatLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..2859fe329a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tcontains_tcbuffer_tcbuffer over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tcontains_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TcontainsTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TcontainsTcbufferTcbuffer"; + + TcontainsTcbufferTcbufferLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..5c3d0768de --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tcontains_tgeo_tgeo over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tcontains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TcontainsTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TcontainsTgeoTgeo"; + + TcontainsTgeoTgeoLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..003586d841 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tcovers_tcbuffer_tcbuffer over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tcovers_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TcoversTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TcoversTcbufferTcbuffer"; + + TcoversTcbufferTcbufferLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TcoversTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TcoversTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..6ce87105af --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TcoversTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tcovers_tgeo_tgeo over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tcovers_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TcoversTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TcoversTgeoTgeo"; + + TcoversTgeoTgeoLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.hpp new file mode 100644 index 0000000000..12aa682f04 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tcbuffer_tcbuffer over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTcbufferTcbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTcbufferTcbuffer"; + + TdistanceTcbufferTcbufferLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTfloatFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTfloatFloatLogicalFunction.hpp new file mode 100644 index 0000000000..1c3e73ccea --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTfloatFloatLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tfloat_float: temporal distance between tfloat and scalar float. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTfloatFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTfloatFloat"; + + TdistanceTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.hpp new file mode 100644 index 0000000000..8dc6fc67f7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tgeo_tgeo over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTgeoTgeoLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTgeoTgeo"; + + TdistanceTgeoTgeoLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTintIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTintIntLogicalFunction.hpp new file mode 100644 index 0000000000..1e53f1fcd0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTintIntLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tint_int: temporal distance between tint and scalar int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTintIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTintInt"; + + TdistanceTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.hpp new file mode 100644 index 0000000000..664a13bd1c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tnpoint_tnpoint over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tnpoint_tnpoint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTnpointTnpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTnpointTnpoint"; + + TdistanceTnpointTnpointLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.hpp new file mode 100644 index 0000000000..aee925f62f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tnumber_tnumber: temporal distance between two tnumbers (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tnumber_tnumber`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTnumberTnumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTnumberTnumber"; + + TdistanceTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TdistanceTposeTposeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TdistanceTposeTposeLogicalFunction.hpp new file mode 100644 index 0000000000..fe60e67761 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TdistanceTposeTposeLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tdistance_tpose_tpose over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tdistance_tpose_tpose`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TdistanceTposeTposeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TdistanceTposeTpose"; + + TdistanceTposeTposeLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..52952dcc0a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsGeometry"; + + TemporalAContainsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..4e9da6f744 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTCbufferCbuffer"; + + TemporalAContainsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..f1d021a166 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTCbuffer"; + + TemporalAContainsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..a0b4163fec --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTGeometry"; + + TemporalAContainsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..377708047d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTNpointGeometry"; + + TemporalAContainsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..ffe53d096d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTNpointTNpoint"; + + TemporalAContainsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..df1a06fe14 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTPoseGeometry"; + + TemporalAContainsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..c891594864 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acontains_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acontains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAContainsTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAContainsTPoseTPose"; + + TemporalAContainsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..0da1f4fbf6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acovers_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalACoversTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalACoversTCbufferCbuffer"; + + TemporalACoversTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..341d11002e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalACoversTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event acovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `acovers_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalACoversTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalACoversTCbuffer"; + + TemporalACoversTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..692441da21 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinGeometry"; + + TemporalADWithinGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..9a09a59dba --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tcbuffer_cbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTCbufferCbuffer"; + + TemporalADWithinTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..0614d1a943 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tcbuffer_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTCbufferGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTCbufferGeometry"; + + TemporalADWithinTCbufferGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..5243aa55a9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tcbuffer_tcbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTCbufferTCbuffer"; + + TemporalADWithinTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..9b7bcffa77 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_tgeo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTGeometry"; + + TemporalADWithinTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..7cf7ca205e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTNpointGeometry"; + + TemporalADWithinTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..5ebd99870e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTNpointTNpoint"; + + TemporalADWithinTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..834cbb9797 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTPoseGeometry"; + + TemporalADWithinTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..d5c230df56 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adwithin_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADWithinTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADWithinTPoseTPose"; + + TemporalADWithinTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..585369d0af --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointGeometry"; + + TemporalADisjointGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..eac33a241f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTCbufferCbuffer"; + + TemporalADisjointTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..1021cc6e43 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTCbuffer"; + + TemporalADisjointTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..d0a67224e5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTCbufferTCbuffer"; + + TemporalADisjointTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..df7420bf0b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTGeometry"; + + TemporalADisjointTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..c7cce6db52 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTNpointGeometry"; + + TemporalADisjointTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..eda18f53de --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTNpointTNpoint"; + + TemporalADisjointTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..ace0b13740 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTPoseGeometry"; + + TemporalADisjointTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..d9f06054c6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event adisjoint_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `adisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalADisjointTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalADisjointTPoseTPose"; + + TemporalADisjointTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.hpp index 166969e75f..6b6d851db9 100644 --- a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.hpp +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.hpp @@ -1,3 +1,16 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ #pragma once @@ -8,47 +21,35 @@ namespace NES { +/** + * @brief Per-event aintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ class TemporalAIntersectsGeometryLogicalFunction : public LogicalFunctionConcept { public: static constexpr std::string_view NAME = "TemporalAIntersectsGeometry"; - /// Constructor with 4 parameters for temporal-static intersection: lon1, lat1, timestamp1, static_geometry_wkt - TemporalAIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction staticGeometry); - - /// Constructor with 6 parameters for temporal-temporal intersection: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - TemporalAIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction lon2, LogicalFunction lat2, LogicalFunction timestamp2); + TemporalAIntersectsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); - /// Get the data type of this function (always INT32) DataType getDataType() const override; - - /// Create a new function with the specified data type LogicalFunction withDataType(const DataType& dataType) const override; - - /// Get child functions std::vector getChildren() const override; - - /// Create a new function with different children LogicalFunction withChildren(const std::vector& children) const override; - - /// Get the type name of this function std::string_view getType() const override; - - /// Equality comparison bool operator==(const LogicalFunctionConcept& rhs) const override; - - /// Generate explanation string std::string explain(ExplainVerbosity verbosity) const override; - - /// Infer data type from schema LogicalFunction withInferredDataType(const Schema& schema) const override; - - /// Serialize this function SerializableFunction serialize() const override; private: DataType dataType; - std::vector parameters; // Stores 4 or 6 parameters - bool isTemporal6Param; // true for 6-param temporal-temporal, false for 4-param temporal-static + std::vector parameters; }; -} \ No newline at end of file +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..008c556c3f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTCbufferCbuffer"; + + TemporalAIntersectsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..6f6b6f5e20 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTCbuffer"; + + TemporalAIntersectsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..7ec92b17f0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTCbufferTCbuffer"; + + TemporalAIntersectsTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..e0f718ea12 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTGeometry"; + + TemporalAIntersectsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..0bdfc9a214 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTNpointGeometry"; + + TemporalAIntersectsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..d312194f4d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTNpointTNpoint"; + + TemporalAIntersectsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..2568833d22 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTPoseGeometry"; + + TemporalAIntersectsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..43a1aba57d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event aintersects_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `aintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAIntersectsTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAIntersectsTPoseTPose"; + + TemporalAIntersectsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..e48ea815d3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesGeometry"; + + TemporalATouchesGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..48f72ca750 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTCbufferCbuffer"; + + TemporalATouchesTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..a2210107fc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTCbuffer"; + + TemporalATouchesTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..b56aeb3bc3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTCbufferTCbuffer"; + + TemporalATouchesTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..b7d21ec218 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTGeometry"; + + TemporalATouchesTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..bf137c7ef8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTNpointGeometry"; + + TemporalATouchesTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..380df092f3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTNpointTNpoint"; + + TemporalATouchesTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..b4769459ee --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTPoseGeometry"; + + TemporalATouchesTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..3c61d13bfa --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event atouches_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `atouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalATouchesTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalATouchesTPoseTPose"; + + TemporalATouchesTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAtGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAtGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..f3f17f65a8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalAtGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tgeo_at_geom restriction predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgeo_at_geom`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalAtGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalAtGeometry"; + + TemporalAtGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalAtStBoxLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalAtStBoxLogicalFunction.hpp index 35ca544b65..4113f6b7e7 100644 --- a/nes-logical-operators/include/Functions/Meos/TemporalAtStBoxLogicalFunction.hpp +++ b/nes-logical-operators/include/Functions/Meos/TemporalAtStBoxLogicalFunction.hpp @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once #include @@ -7,20 +21,21 @@ namespace NES { +/** + * @brief Per-event tgeo_at_stbox restriction predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgeo_at_stbox`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ class TemporalAtStBoxLogicalFunction : public LogicalFunctionConcept { public: static constexpr std::string_view NAME = "TemporalAtStBox"; TemporalAtStBoxLogicalFunction(LogicalFunction lon, - LogicalFunction lat, - LogicalFunction timestamp, - LogicalFunction stbox); - - TemporalAtStBoxLogicalFunction(LogicalFunction lon, - LogicalFunction lat, - LogicalFunction timestamp, - LogicalFunction stbox, - LogicalFunction borderInclusive); + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); DataType getDataType() const override; LogicalFunction withDataType(const DataType& dataType) const override; @@ -35,7 +50,6 @@ class TemporalAtStBoxLogicalFunction : public LogicalFunctionConcept { private: DataType dataType; std::vector parameters; - bool hasBorderParam; }; } // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalCmpLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalCmpLogicalFunction.hpp new file mode 100644 index 0000000000..8ccc4910d6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalCmpLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_cmp. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_cmp`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalCmpLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalCmp"; + + TemporalCmpLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.hpp new file mode 100644 index 0000000000..2eee5764ae --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_dyntimewarp_distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_dyntimewarp_distance`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalDyntimewarpDistanceLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalDyntimewarpDistance"; + + TemporalDyntimewarpDistanceLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsGeometryLogicalFunction.hpp index ad16fddc3c..440c1dd89f 100644 --- a/nes-logical-operators/include/Functions/Meos/TemporalEContainsGeometryLogicalFunction.hpp +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsGeometryLogicalFunction.hpp @@ -1,40 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once + #include #include +#include #include namespace NES { +/** + * @brief Per-event econtains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ class TemporalEContainsGeometryLogicalFunction : public LogicalFunctionConcept { public: static constexpr std::string_view NAME = "TemporalEContainsGeometry"; - TemporalEContainsGeometryLogicalFunction(LogicalFunction param1, - LogicalFunction param2, - LogicalFunction param3, - LogicalFunction param4); - - /// temporal–temporal (tgeo, tgeo) → econtains_tgeo_tgeo - TemporalEContainsGeometryLogicalFunction(LogicalFunction lon1, - LogicalFunction lat1, - LogicalFunction ts1, - LogicalFunction lon2, - LogicalFunction lat2, - LogicalFunction ts2); - - /** --- inherited API --- **/ - DataType getDataType() const override; - LogicalFunction withDataType(const DataType&) const override; - std::vector getChildren() const override; - LogicalFunction withChildren(const std::vector&) const override; - std::string_view getType() const override; - bool operator==(const LogicalFunctionConcept&) const override; - std::string explain(ExplainVerbosity) const override; - LogicalFunction withInferredDataType(const Schema&) const override; - SerializableFunction serialize() const override; + TemporalEContainsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; private: - DataType dataType; + DataType dataType; std::vector parameters; }; diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..b37f6771d7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTCbufferCbuffer"; + + TemporalEContainsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..50677c1d13 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTCbuffer"; + + TemporalEContainsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..51c0ce46bc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTGeometry"; + + TemporalEContainsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..29d4acc169 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTNpointGeometry"; + + TemporalEContainsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..08382d3ee7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTNpointTNpoint"; + + TemporalEContainsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..6d957099eb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTPoseGeometry"; + + TemporalEContainsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..eccb524dbe --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event econtains_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `econtains_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEContainsTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEContainsTPoseTPose"; + + TemporalEContainsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..338d1ffb7d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversGeometry"; + + TemporalECoversGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..207c816471 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTCbufferCbuffer"; + + TemporalECoversTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..ac787c8852 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTCbuffer"; + + TemporalECoversTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..24a935b82c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTCbufferTCbuffer"; + + TemporalECoversTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..c4c43a6813 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTGeometry"; + + TemporalECoversTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..f88d43f453 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTNpointGeometry"; + + TemporalECoversTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..462126065d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTNpointTNpoint"; + + TemporalECoversTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..74bc9df889 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTPoseGeometry"; + + TemporalECoversTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..3ea0443143 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event ecovers_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ecovers_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalECoversTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalECoversTPoseTPose"; + + TemporalECoversTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.hpp index 6f76a69e77..84f1ea4d8c 100644 --- a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.hpp +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.hpp @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once #include @@ -7,15 +21,22 @@ namespace NES { +/** + * @brief Per-event edwithin_tgeo_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ class TemporalEDWithinGeometryLogicalFunction : public LogicalFunctionConcept { public: static constexpr std::string_view NAME = "TemporalEDWithinGeometry"; TemporalEDWithinGeometryLogicalFunction(LogicalFunction lon, - LogicalFunction lat, - LogicalFunction timestamp, - LogicalFunction geometry, - LogicalFunction distance); + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); DataType getDataType() const override; LogicalFunction withDataType(const DataType& dataType) const override; diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..1a07129732 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tcbuffer_cbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTCbufferCbuffer"; + + TemporalEDWithinTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..66dd181ed7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tcbuffer_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTCbufferGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTCbufferGeometry"; + + TemporalEDWithinTCbufferGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..48999e8768 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tcbuffer_tcbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTCbufferTCbuffer"; + + TemporalEDWithinTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..c304dfa442 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_tgeo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTGeometry"; + + TemporalEDWithinTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..ba11374e8c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTNpointGeometry"; + + TemporalEDWithinTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..f7f17babc8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,58 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTNpointTNpoint"; + + TemporalEDWithinTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..d1735aedc0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTPoseGeometry"; + + TemporalEDWithinTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..f71bef5518 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,60 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edwithin_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edwithin_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDWithinTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDWithinTPoseTPose"; + + TemporalEDWithinTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB, + LogicalFunction dist); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..58c2a6bbdb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointGeometry"; + + TemporalEDisjointGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..98ab82773b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTCbufferCbuffer"; + + TemporalEDisjointTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..e49ebc91f4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTCbuffer"; + + TemporalEDisjointTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..16b0862a02 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTGeometry"; + + TemporalEDisjointTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..12b7b7ec41 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTNpointGeometry"; + + TemporalEDisjointTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..ddeef61d67 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTNpointTNpoint"; + + TemporalEDisjointTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..edba38b0bd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTPoseGeometry"; + + TemporalEDisjointTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..0aa93982b7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event edisjoint_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `edisjoint_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEDisjointTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEDisjointTPoseTPose"; + + TemporalEDisjointTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..45c08703e1 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsGeometry"; + + TemporalEIntersectsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..1eb8c22d3c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTCbufferCbuffer"; + + TemporalEIntersectsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..3b72437289 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTCbuffer"; + + TemporalEIntersectsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..834e931a58 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTCbufferTCbuffer"; + + TemporalEIntersectsTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..f2a8a83e16 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTGeometry"; + + TemporalEIntersectsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..02c4471fcf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTNpointGeometry"; + + TemporalEIntersectsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..4c4030a205 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTNpointTNpoint"; + + TemporalEIntersectsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..e67f410a0d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTPoseGeometry"; + + TemporalEIntersectsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..be5b840d29 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event eintersects_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `eintersects_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEIntersectsTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEIntersectsTPoseTPose"; + + TemporalEIntersectsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..fbff3615cc --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesGeometry"; + + TemporalETouchesGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..7bb035b870 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTCbufferCbuffer"; + + TemporalETouchesTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..21653ed90a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTCbuffer"; + + TemporalETouchesTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..ba810a8ed9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTCbufferTCbuffer"; + + TemporalETouchesTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..9280d974d8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTGeometry"; + + TemporalETouchesTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..94900f4513 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTNpointGeometry"; + + TemporalETouchesTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..fba1aa82f4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTNpointTNpoint"; + + TemporalETouchesTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..e40139c2f5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTPoseGeometry"; + + TemporalETouchesTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..00033b85c0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event etouches_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `etouches_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalETouchesTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalETouchesTPoseTPose"; + + TemporalETouchesTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalEqLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalEqLogicalFunction.hpp new file mode 100644 index 0000000000..22db7019e4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalEqLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_eq. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_eq`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalEqLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalEq"; + + TemporalEqLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalFrechetDistanceLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalFrechetDistanceLogicalFunction.hpp new file mode 100644 index 0000000000..0c94487007 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalFrechetDistanceLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_frechet_distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_frechet_distance`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalFrechetDistanceLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalFrechetDistance"; + + TemporalFrechetDistanceLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalGeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalGeLogicalFunction.hpp new file mode 100644 index 0000000000..52de0470a8 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalGeLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_ge. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_ge`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalGeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalGe"; + + TemporalGeLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalGtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalGtLogicalFunction.hpp new file mode 100644 index 0000000000..8e1af98494 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalGtLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_gt. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_gt`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalGtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalGt"; + + TemporalGtLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.hpp new file mode 100644 index 0000000000..bc54d328c9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_hausdorff_distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_hausdorff_distance`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalHausdorffDistanceLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalHausdorffDistance"; + + TemporalHausdorffDistanceLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.hpp index b409f845b9..4d89dbc679 100644 --- a/nes-logical-operators/include/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.hpp +++ b/nes-logical-operators/include/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.hpp @@ -1,4 +1,16 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ #pragma once @@ -9,47 +21,35 @@ namespace NES { +/** + * @brief Per-event intersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `intersects_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ class TemporalIntersectsGeometryLogicalFunction : public LogicalFunctionConcept { public: static constexpr std::string_view NAME = "TemporalIntersectsGeometry"; - /// Constructor with 4 parameters for temporal-static intersection: lon1, lat1, timestamp1, static_geometry_wkt - TemporalIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction staticGeometry); - - /// Constructor with 6 parameters for temporal-temporal intersection: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - TemporalIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction lon2, LogicalFunction lat2, LogicalFunction timestamp2); + TemporalIntersectsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); - /// Get the data type of this function (always INT32) DataType getDataType() const override; - - /// Create a new function with the specified data type LogicalFunction withDataType(const DataType& dataType) const override; - - /// Get child functions std::vector getChildren() const override; - - /// Create a new function with different children LogicalFunction withChildren(const std::vector& children) const override; - - /// Get the type name of this function std::string_view getType() const override; - - /// Equality comparison bool operator==(const LogicalFunctionConcept& rhs) const override; - - /// Generate explanation string std::string explain(ExplainVerbosity verbosity) const override; - - /// Infer data type from schema LogicalFunction withInferredDataType(const Schema& schema) const override; - - /// Serialize this function SerializableFunction serialize() const override; private: DataType dataType; - std::vector parameters; // Stores 4 or 6 parameters - bool isTemporal6Param; // true for 6-param temporal-temporal, false for 4-param temporal-static + std::vector parameters; }; -} \ No newline at end of file +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalLeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalLeLogicalFunction.hpp new file mode 100644 index 0000000000..0a7ac6d685 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalLeLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_le. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_le`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalLeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalLe"; + + TemporalLeLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalLtLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalLtLogicalFunction.hpp new file mode 100644 index 0000000000..14036aff34 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalLtLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_lt. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_lt`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalLtLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalLt"; + + TemporalLtLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalMinusGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalMinusGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..bf090a4711 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalMinusGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tgeo_minus_geom restriction predicate. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tgeo_minus_geom`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalMinusGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalMinusGeometry"; + + TemporalMinusGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADFloatScalarLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADFloatScalarLogicalFunction.hpp new file mode 100644 index 0000000000..86546756f5 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADFloatScalarLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tfloat_float distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tfloat_float`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADFloatScalarLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADFloatScalar"; + + TemporalNADFloatScalarLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..f429a6f52b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_geo nearest-approach distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADGeometry"; + + TemporalNADGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADIntScalarLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADIntScalarLogicalFunction.hpp new file mode 100644 index 0000000000..b33a30d23d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADIntScalarLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tint_int distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tint_int`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADIntScalarLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADIntScalar"; + + TemporalNADIntScalarLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..19955a9f63 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tcbuffer_cbuffer distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_cbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTCbufferCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTCbufferCbuffer"; + + TemporalNADTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..7cc81c2cdd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tcbuffer_geo distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTCbuffer"; + + TemporalNADTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.hpp new file mode 100644 index 0000000000..1961c98753 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tcbuffer_tcbuffer distance. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tcbuffer_tcbuffer`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTCbufferTCbufferLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTCbufferTCbuffer"; + + TemporalNADTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTFloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTFloatLogicalFunction.hpp new file mode 100644 index 0000000000..6788eba36b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTFloatLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tfloat_tfloat distance between two tfloat instants. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tfloat_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTFloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTFloat"; + + TemporalNADTFloatLogicalFunction(LogicalFunction valueA, + LogicalFunction tsA, + LogicalFunction valueB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..385a9dee6a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTGeometryLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_tgeo. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTGeometry"; + + TemporalNADTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTIntLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTIntLogicalFunction.hpp new file mode 100644 index 0000000000..bbce70a553 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTIntLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tint_tint distance between two tint instants. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tint_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTIntLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTInt"; + + TemporalNADTIntLogicalFunction(LogicalFunction valueA, + LogicalFunction tsA, + LogicalFunction valueB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..0a9266429e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_geo (nearest approach distance) via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTNpointGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTNpointGeometry"; + + TemporalNADTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.hpp new file mode 100644 index 0000000000..353998cdc7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_tgeo (nearest approach distance) via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTNpointTNpointLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTNpointTNpoint"; + + TemporalNADTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.hpp new file mode 100644 index 0000000000..2b8077abd0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.hpp @@ -0,0 +1,56 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_geo (nearest approach distance) via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_geo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTPoseGeometryLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTPoseGeometry"; + + TemporalNADTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.hpp new file mode 100644 index 0000000000..c1c36db5c9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.hpp @@ -0,0 +1,59 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event nad_tgeo_tgeo (nearest approach distance) via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `nad_tgeo_tgeo`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNADTPoseTPoseLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNADTPoseTPose"; + + TemporalNADTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalNeLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalNeLogicalFunction.hpp new file mode 100644 index 0000000000..58c33608ac --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalNeLogicalFunction.hpp @@ -0,0 +1,57 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_ne. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_ne`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalNeLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalNe"; + + TemporalNeLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TemporalRoundLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TemporalRoundLogicalFunction.hpp new file mode 100644 index 0000000000..dfeb2020eb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TemporalRoundLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event temporal_round: round single-instant tfloat to given decimal places. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `temporal_round`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TemporalRoundLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TemporalRound"; + + TemporalRoundLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TeqBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..bc5a4977bb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event teq_bool_tbool: temporal equality of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqBoolTbool"; + + TeqBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TeqTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TeqTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..dfb7b42526 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TeqTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event teq_tbool_bool: temporal equality of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `teq_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TeqTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TeqTboolBool"; + + TeqTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TextInitcapLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TextInitcapLogicalFunction.hpp new file mode 100644 index 0000000000..cee9d8a58d --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TextInitcapLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Text initcapcase + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `text_initcap`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TextInitcapLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TextInitcap"; + + TextInitcapLogicalFunction(LogicalFunction str); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TextLowerLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TextLowerLogicalFunction.hpp new file mode 100644 index 0000000000..42713c1a9f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TextLowerLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Text lowercase + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `text_lower`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TextLowerLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TextLower"; + + TextLowerLogicalFunction(LogicalFunction str); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TextUpperLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TextUpperLogicalFunction.hpp new file mode 100644 index 0000000000..bf79255856 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TextUpperLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Text uppercase + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `text_upper`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TextUpperLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TextUpper"; + + TextUpperLogicalFunction(LogicalFunction str); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TextcatTextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TextcatTextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..0dab3f4d84 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TextcatTextTtextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Concatenate text and ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `textcat_text_ttext(txt0, temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TextcatTextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TextcatTextTtext"; + + TextcatTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TextcatTtextTextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TextcatTtextTextLogicalFunction.hpp new file mode 100644 index 0000000000..67630b784a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TextcatTtextTextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Concatenate ttext and text + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `textcat_ttext_text(temp, txt0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TextcatTtextTextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TextcatTtextText"; + + TextcatTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TextcatTtextTtextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TextcatTtextTtextLogicalFunction.hpp new file mode 100644 index 0000000000..af47f49acb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TextcatTtextTtextLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Concatenate ttext and ttext + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `textcat_ttext_ttext(temp, inst0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TextcatTtextTtextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TextcatTtextTtext"; + + TextcatTtextTtextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction tval0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatCeilLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatCeilLogicalFunction.hpp new file mode 100644 index 0000000000..e731cb516a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatCeilLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_ceil: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_ceil`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatCeilLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatCeil"; + + TfloatCeilLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatExpLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatExpLogicalFunction.hpp new file mode 100644 index 0000000000..a006015a7b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatExpLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_exp: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_exp`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatExpLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatExp"; + + TfloatExpLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatFloorLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatFloorLogicalFunction.hpp new file mode 100644 index 0000000000..8734d8a205 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatFloorLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_floor: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_floor`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatFloorLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatFloor"; + + TfloatFloorLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatLnLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatLnLogicalFunction.hpp new file mode 100644 index 0000000000..2924cce5ff --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatLnLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_ln: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_ln`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatLnLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatLn"; + + TfloatLnLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatLog10LogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatLog10LogicalFunction.hpp new file mode 100644 index 0000000000..0b3703d878 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatLog10LogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_log10: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_log10`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatLog10LogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatLog10"; + + TfloatLog10LogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatRadiansLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatRadiansLogicalFunction.hpp new file mode 100644 index 0000000000..cc5271f409 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatRadiansLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_radians: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_radians`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatRadiansLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatRadians"; + + TfloatRadiansLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatScaleValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatScaleValueLogicalFunction.hpp new file mode 100644 index 0000000000..c25d67039f --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatScaleValueLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_scale_value: scale single-instant tfloat value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_scale_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatScaleValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatScaleValue"; + + TfloatScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatShiftScaleValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatShiftScaleValueLogicalFunction.hpp new file mode 100644 index 0000000000..d5c8b14166 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatShiftScaleValueLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_shift_scale_value: shift then scale single-instant tfloat value. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_shift_scale_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatShiftScaleValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatShiftScaleValue"; + + TfloatShiftScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatShiftValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatShiftValueLogicalFunction.hpp new file mode 100644 index 0000000000..0179fe80d7 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatShiftValueLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_shift_value: shift single-instant tfloat value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_shift_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatShiftValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatShiftValue"; + + TfloatShiftValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatToTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatToTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..c716f7beff --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatToTbigintLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_to_tbigint: convert single-instant tfloat to tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_to_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatToTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatToTbigint"; + + TfloatToTbigintLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TfloatToTintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TfloatToTintLogicalFunction.hpp new file mode 100644 index 0000000000..b595ceb478 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TfloatToTintLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tfloat_to_tint: single-instant tfloat transform, value extracted -> int. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tfloat_to_tint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TfloatToTintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TfloatToTint"; + + TfloatToTintLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.hpp new file mode 100644 index 0000000000..39e4509088 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index are neighbor cells + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_are_neighbor_cells(temp, inst0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexAreNeighborCellsLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexAreNeighborCells"; + + Th3indexAreNeighborCellsLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction cell0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.hpp new file mode 100644 index 0000000000..7c88ca63bd --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index cell to center child + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_cell_to_center_child(temp, (int32_t)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexCellToCenterChildLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexCellToCenterChild"; + + Th3indexCellToCenterChildLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.hpp new file mode 100644 index 0000000000..e31c08aa40 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index cell to center child next + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_cell_to_center_child_next(temp, (int32_t)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexCellToCenterChildNextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexCellToCenterChildNext"; + + Th3indexCellToCenterChildNextLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexCellToChildPosLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexCellToChildPosLogicalFunction.hpp new file mode 100644 index 0000000000..9ee7b744ca --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexCellToChildPosLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index cell to child position + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_cell_to_child_pos(temp, (int32_t)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexCellToChildPosLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexCellToChildPos"; + + Th3indexCellToChildPosLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexCellToParentLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexCellToParentLogicalFunction.hpp new file mode 100644 index 0000000000..cac698cd47 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexCellToParentLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index cell to parent + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_cell_to_parent(temp, (int32_t)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexCellToParentLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexCellToParent"; + + Th3indexCellToParentLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexCellToParentNextLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexCellToParentNextLogicalFunction.hpp new file mode 100644 index 0000000000..4650a8fa74 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexCellToParentNextLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index cell to parent next + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_cell_to_parent_next(temp, (int32_t)arg0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexCellToParentNextLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexCellToParentNext"; + + Th3indexCellToParentNextLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.hpp new file mode 100644 index 0000000000..7164f755f4 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index get base cell number + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_get_base_cell_number(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexGetBaseCellNumberLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexGetBaseCellNumber"; + + Th3indexGetBaseCellNumberLogicalFunction(LogicalFunction cell, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexGetResolutionLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexGetResolutionLogicalFunction.hpp new file mode 100644 index 0000000000..449da5178c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexGetResolutionLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index get resolution + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_get_resolution(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexGetResolutionLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexGetResolution"; + + Th3indexGetResolutionLogicalFunction(LogicalFunction cell, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexGridDistanceLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexGridDistanceLogicalFunction.hpp new file mode 100644 index 0000000000..ada7a443f3 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexGridDistanceLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index grid distance + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_grid_distance(temp, inst0)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexGridDistanceLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexGridDistance"; + + Th3indexGridDistanceLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction cell0, + LogicalFunction ts0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexIsPentagonLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexIsPentagonLogicalFunction.hpp new file mode 100644 index 0000000000..d85d41f1ee --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexIsPentagonLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index is pentagon + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_is_pentagon(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexIsPentagonLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexIsPentagon"; + + Th3indexIsPentagonLogicalFunction(LogicalFunction cell, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/Th3indexIsValidCellLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/Th3indexIsValidCellLogicalFunction.hpp new file mode 100644 index 0000000000..4c839add81 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/Th3indexIsValidCellLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Th3index th3index is valid cell + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `th3index_is_valid_cell(temp)`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class Th3indexIsValidCellLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "Th3indexIsValidCell"; + + Th3indexIsValidCellLogicalFunction(LogicalFunction cell, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TintScaleValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TintScaleValueLogicalFunction.hpp new file mode 100644 index 0000000000..d39c727442 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TintScaleValueLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tint_scale_value: scale single-instant tint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tint_scale_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TintScaleValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TintScaleValue"; + + TintScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TintShiftScaleValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TintShiftScaleValueLogicalFunction.hpp new file mode 100644 index 0000000000..db8203bba6 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TintShiftScaleValueLogicalFunction.hpp @@ -0,0 +1,55 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tint_shift_scale_value: shift then scale single-instant tint value. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tint_shift_scale_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TintShiftScaleValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TintShiftScaleValue"; + + TintShiftScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0, + LogicalFunction arg1); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TintShiftValueLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TintShiftValueLogicalFunction.hpp new file mode 100644 index 0000000000..fb075dc2bf --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TintShiftValueLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tint_shift_value: shift single-instant tint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tint_shift_value`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TintShiftValueLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TintShiftValue"; + + TintShiftValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TintToTbigintLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TintToTbigintLogicalFunction.hpp new file mode 100644 index 0000000000..cfeb8a46eb --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TintToTbigintLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tint_to_tbigint: convert single-instant tint to tbigint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tint_to_tbigint`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TintToTbigintLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TintToTbigint"; + + TintToTbigintLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TintToTfloatLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TintToTfloatLogicalFunction.hpp new file mode 100644 index 0000000000..623e82bd44 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TintToTfloatLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tint_to_tfloat: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tint_to_tfloat`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TintToTfloatLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TintToTfloat"; + + TintToTfloatLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TneBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..f29c17e415 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tne_bool_tbool: temporal inequality of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneBoolTbool"; + + TneBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TneTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TneTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..0f67c12bc9 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TneTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tne_tbool_bool: temporal inequality of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tne_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TneTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TneTboolBool"; + + TneTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TnotTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TnotTboolLogicalFunction.hpp new file mode 100644 index 0000000000..d837e5e7f0 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TnotTboolLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tnot_tbool: logical NOT of single-instant tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tnot_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TnotTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TnotTbool"; + + TnotTboolLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TnpointLengthLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TnpointLengthLogicalFunction.hpp new file mode 100644 index 0000000000..26c2985e85 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TnpointLengthLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tnpoint_length. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tnpoint_length`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TnpointLengthLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TnpointLength"; + + TnpointLengthLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TorBoolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TorBoolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..45d15b03ea --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TorBoolTboolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tor_bool_tbool: temporal OR of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tor_bool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TorBoolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TorBoolTbool"; + + TorBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TorTboolBoolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TorTboolBoolLogicalFunction.hpp new file mode 100644 index 0000000000..f6de7c0f7a --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TorTboolBoolLogicalFunction.hpp @@ -0,0 +1,54 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tor_tbool_bool: temporal OR of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tor_tbool_bool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TorTboolBoolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TorTboolBool"; + + TorTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TorTboolTboolLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TorTboolTboolLogicalFunction.hpp new file mode 100644 index 0000000000..a4f73efb2c --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TorTboolTboolLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tor_tbool_tbool: temporal OR of two tbool values (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tor_tbool_tbool`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TorTboolTboolLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TorTboolTbool"; + + TorTboolTboolLogicalFunction(LogicalFunction traj, + LogicalFunction arg0); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TpointLengthWkbLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TpointLengthWkbLogicalFunction.hpp new file mode 100644 index 0000000000..a4700d0664 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TpointLengthWkbLogicalFunction.hpp @@ -0,0 +1,52 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Per-event tpoint_length from a hex-WKB tgeompoint. + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `tpoint_length`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TpointLengthWkbLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TpointLengthWkb"; + + TpointLengthWkbLogicalFunction(LogicalFunction traj); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TtextInitcapLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TtextInitcapLogicalFunction.hpp new file mode 100644 index 0000000000..ce77982752 --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TtextInitcapLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal text initcapcase + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ttext_initcap`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TtextInitcapLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TtextInitcap"; + + TtextInitcapLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TtextLowerLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TtextLowerLogicalFunction.hpp new file mode 100644 index 0000000000..e301f0506e --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TtextLowerLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal text lowercase + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ttext_lower`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TtextLowerLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TtextLower"; + + TtextLowerLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/include/Functions/Meos/TtextUpperLogicalFunction.hpp b/nes-logical-operators/include/Functions/Meos/TtextUpperLogicalFunction.hpp new file mode 100644 index 0000000000..d6583ccc1b --- /dev/null +++ b/nes-logical-operators/include/Functions/Meos/TtextUpperLogicalFunction.hpp @@ -0,0 +1,53 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Temporal text uppercase + * + * Generated by tools/codegen/codegen_nebula.py from the MEOS function + * `ttext_upper`. Per-event scalar operator following the + * TemporalEDWithinGeometry pattern. + */ +class TtextUpperLogicalFunction : public LogicalFunctionConcept { +public: + static constexpr std::string_view NAME = "TtextUpper"; + + TtextUpperLogicalFunction(LogicalFunction value, + LogicalFunction ts); + + DataType getDataType() const override; + LogicalFunction withDataType(const DataType& dataType) const override; + std::vector getChildren() const override; + LogicalFunction withChildren(const std::vector& children) const override; + std::string_view getType() const override; + bool operator==(const LogicalFunctionConcept& rhs) const override; + std::string explain(ExplainVerbosity verbosity) const override; + LogicalFunction withInferredDataType(const Schema& schema) const override; + SerializableFunction serialize() const override; + +private: + DataType dataType; + std::vector parameters; +}; + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AboveStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AboveStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..fa77361fcb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AboveStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AboveStboxStboxLogicalFunction::AboveStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType AboveStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AboveStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AboveStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AboveStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AboveStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AboveStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AboveStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AboveStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AboveStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AboveStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAboveStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AboveStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AboveStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AboveStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AboveStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..1e281ea75c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AboveStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AboveStboxTspatialLogicalFunction::AboveStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AboveStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AboveStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AboveStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AboveStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AboveStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AboveStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool AboveStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AboveStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AboveStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AboveStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAboveStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AboveStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AboveStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AboveTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AboveTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..b257ba7b3a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AboveTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AboveTspatialStboxLogicalFunction::AboveTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AboveTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AboveTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AboveTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AboveTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AboveTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AboveTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AboveTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AboveTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AboveTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AboveTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAboveTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AboveTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AboveTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AboveTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AboveTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..0e58f72c8a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AboveTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AboveTspatialTspatialLogicalFunction::AboveTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AboveTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AboveTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AboveTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AboveTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AboveTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AboveTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool AboveTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AboveTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AboveTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AboveTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAboveTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AboveTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AboveTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..149b4545e0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcontainsGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcontainsGeoTrgeometryLogicalFunction::AcontainsGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); +} +DataType AcontainsGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AcontainsGeoTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AcontainsGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AcontainsGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"AcontainsGeoTrgeometryLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AcontainsGeoTrgeometryLogicalFunction::getType() const { return NAME; } +bool AcontainsGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AcontainsGeoTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AcontainsGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + return withChildren(c); +} +SerializableFunction AcontainsGeoTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcontainsGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "AcontainsGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AcontainsGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..23d13cd280 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcontainsTcbufferGeoLogicalFunction::AcontainsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AcontainsTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcontainsTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcontainsTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcontainsTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AcontainsTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcontainsTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcontainsTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcontainsTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcontainsTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcontainsTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcontainsTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AcontainsTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AcontainsTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..49de10fe42 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcontainsTcbufferTcbufferLogicalFunction::AcontainsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AcontainsTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcontainsTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcontainsTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcontainsTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AcontainsTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcontainsTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AcontainsTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcontainsTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcontainsTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcontainsTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcontainsTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AcontainsTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AcontainsTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcontainsTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcontainsTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..5fde5170e4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcontainsTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcontainsTgeoGeoLogicalFunction::AcontainsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AcontainsTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcontainsTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcontainsTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcontainsTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AcontainsTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcontainsTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcontainsTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcontainsTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcontainsTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcontainsTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcontainsTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AcontainsTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AcontainsTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..677048ed17 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcontainsTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcontainsTgeoTgeoLogicalFunction::AcontainsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AcontainsTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcontainsTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcontainsTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcontainsTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AcontainsTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcontainsTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcontainsTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcontainsTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcontainsTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcontainsTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcontainsTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AcontainsTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AcontainsTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..64cbfcf348 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcoversGeoTrgeometryLogicalFunction::AcoversGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); +} +DataType AcoversGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AcoversGeoTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AcoversGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AcoversGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"AcoversGeoTrgeometryLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AcoversGeoTrgeometryLogicalFunction::getType() const { return NAME; } +bool AcoversGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AcoversGeoTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AcoversGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + return withChildren(c); +} +SerializableFunction AcoversGeoTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "AcoversGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AcoversGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcoversTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..2317235569 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcoversTcbufferGeoLogicalFunction::AcoversTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AcoversTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcoversTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcoversTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcoversTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AcoversTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcoversTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcoversTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcoversTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcoversTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcoversTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AcoversTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AcoversTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..1616096392 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcoversTcbufferTcbufferLogicalFunction::AcoversTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AcoversTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcoversTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcoversTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcoversTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AcoversTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcoversTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AcoversTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcoversTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcoversTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcoversTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AcoversTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AcoversTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcoversTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..4192a9ad20 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcoversTgeoGeoLogicalFunction::AcoversTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AcoversTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcoversTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcoversTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcoversTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AcoversTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcoversTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcoversTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcoversTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcoversTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcoversTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AcoversTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AcoversTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcoversTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..01307dbe67 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcoversTgeoTgeoLogicalFunction::AcoversTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AcoversTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AcoversTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AcoversTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AcoversTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AcoversTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AcoversTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AcoversTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AcoversTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AcoversTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AcoversTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AcoversTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AcoversTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..e421ef2b37 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AcoversTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AcoversTrgeometryGeoLogicalFunction::AcoversTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType AcoversTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AcoversTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AcoversTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AcoversTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"AcoversTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AcoversTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool AcoversTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AcoversTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AcoversTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction AcoversTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAcoversTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "AcoversTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AcoversTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..66eb8dfebb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddBigintTbigintLogicalFunction::AddBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AddBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AddBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AddBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AddBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AddBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..94237e2dee --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddFloatTfloatLogicalFunction::AddFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AddFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AddFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AddFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AddFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AddFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..3e76ac0d2b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddIntTintLogicalFunction::AddIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AddIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AddIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AddIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AddIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AddIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..aea382eef6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddTbigintBigintLogicalFunction::AddTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AddTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AddTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AddTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AddTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AddTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..ea96bd0a3c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddTfloatFloatLogicalFunction::AddTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AddTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AddTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AddTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AddTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AddTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..15522e06dc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddTintIntLogicalFunction::AddTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AddTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AddTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AddTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AddTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AddTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AddTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AddTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..01c804b1b8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AddTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AddTnumberTnumberLogicalFunction::AddTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType AddTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AddTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AddTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AddTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AddTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AddTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool AddTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AddTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AddTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AddTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAddTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AddTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AddTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..72ac8ed390 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdisjointTcbufferGeoLogicalFunction::AdisjointTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AdisjointTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdisjointTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdisjointTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdisjointTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AdisjointTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdisjointTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AdisjointTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdisjointTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdisjointTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdisjointTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AdisjointTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AdisjointTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..d3cbae2683 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdisjointTcbufferTcbufferLogicalFunction::AdisjointTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AdisjointTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdisjointTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdisjointTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdisjointTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AdisjointTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdisjointTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AdisjointTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdisjointTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdisjointTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdisjointTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AdisjointTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AdisjointTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdisjointTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..2cc3cff5d7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdisjointTgeoGeoLogicalFunction::AdisjointTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AdisjointTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdisjointTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdisjointTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdisjointTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AdisjointTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdisjointTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AdisjointTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdisjointTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdisjointTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdisjointTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AdisjointTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AdisjointTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..e058eba3a7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdisjointTgeoTgeoLogicalFunction::AdisjointTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AdisjointTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdisjointTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdisjointTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdisjointTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AdisjointTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdisjointTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AdisjointTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdisjointTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdisjointTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdisjointTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AdisjointTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AdisjointTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..ef8980507d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdisjointTrgeometryGeoLogicalFunction::AdisjointTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType AdisjointTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AdisjointTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AdisjointTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AdisjointTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"AdisjointTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AdisjointTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool AdisjointTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AdisjointTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AdisjointTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction AdisjointTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "AdisjointTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AdisjointTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..93de2cb320 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,99 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdisjointTrgeometryTrgeometryLogicalFunction::AdisjointTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} +DataType AdisjointTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AdisjointTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AdisjointTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AdisjointTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==10,"AdisjointTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AdisjointTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } +bool AdisjointTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AdisjointTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AdisjointTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(10); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} +SerializableFunction AdisjointTrgeometryTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdisjointTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==10, + "AdisjointTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return AdisjointTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..8cb832312e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentStboxStboxLogicalFunction::AdjacentStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType AdjacentStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AdjacentStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AdjacentStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AdjacentStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..46c3ab9a35 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentStboxTspatialLogicalFunction::AdjacentStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AdjacentStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AdjacentStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AdjacentStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AdjacentStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..0b8fb43fc6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentTboxTnumberLogicalFunction::AdjacentTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AdjacentTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AdjacentTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AdjacentTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AdjacentTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..acac2231e9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentTemporalTemporalLogicalFunction::AdjacentTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AdjacentTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AdjacentTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AdjacentTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AdjacentTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..4127bc607d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentTnumberTboxLogicalFunction::AdjacentTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AdjacentTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AdjacentTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AdjacentTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AdjacentTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..4318d3c343 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentTnumberTnumberLogicalFunction::AdjacentTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType AdjacentTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AdjacentTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AdjacentTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AdjacentTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..196c3a11a7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentTspatialStboxLogicalFunction::AdjacentTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AdjacentTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AdjacentTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AdjacentTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AdjacentTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..0c615a1465 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdjacentTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdjacentTspatialTspatialLogicalFunction::AdjacentTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AdjacentTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdjacentTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdjacentTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdjacentTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AdjacentTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdjacentTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool AdjacentTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdjacentTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdjacentTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdjacentTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdjacentTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AdjacentTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AdjacentTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..e3a53253ff --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferCbufferLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTcbufferCbufferLogicalFunction::AdwithinTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); + parameters.push_back(std::move(dist)); +} + +DataType AdwithinTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdwithinTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdwithinTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdwithinTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AdwithinTcbufferCbufferLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdwithinTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AdwithinTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdwithinTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdwithinTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdwithinTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AdwithinTcbufferCbufferLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AdwithinTcbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..3ae0dd45ad --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTcbufferGeoLogicalFunction::AdwithinTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType AdwithinTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdwithinTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdwithinTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdwithinTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AdwithinTcbufferGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdwithinTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AdwithinTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdwithinTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdwithinTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdwithinTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AdwithinTcbufferGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AdwithinTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..3ea3a54c84 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTcbufferTcbufferLogicalFunction::AdwithinTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(9); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType AdwithinTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdwithinTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdwithinTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdwithinTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "AdwithinTcbufferTcbufferLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdwithinTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AdwithinTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdwithinTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdwithinTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdwithinTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "AdwithinTcbufferTcbufferLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return AdwithinTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..1084e0581a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTgeoGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTgeoGeoLogicalFunction::AdwithinTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType AdwithinTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdwithinTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdwithinTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdwithinTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AdwithinTgeoGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdwithinTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AdwithinTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdwithinTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdwithinTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdwithinTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AdwithinTgeoGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AdwithinTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..2fad6e003c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTgeoTgeoLogicalFunction::AdwithinTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(7); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType AdwithinTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AdwithinTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AdwithinTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AdwithinTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "AdwithinTgeoTgeoLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AdwithinTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AdwithinTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AdwithinTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AdwithinTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AdwithinTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "AdwithinTgeoTgeoLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return AdwithinTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..c3042b1487 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,90 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTrgeometryGeoLogicalFunction::AdwithinTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt, LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(dist)); +} +DataType AdwithinTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AdwithinTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AdwithinTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AdwithinTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==7,"AdwithinTrgeometryGeoLogicalFunction requires 7 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AdwithinTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool AdwithinTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AdwithinTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AdwithinTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(7); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "dist must be FLOAT64"); + return withChildren(c); +} +SerializableFunction AdwithinTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==7, + "AdwithinTrgeometryGeoLogicalFunction requires 7 children but got {}", + arguments.children.size()); + return AdwithinTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..3a875a0289 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AdwithinTrgeometryTrgeometryLogicalFunction::AdwithinTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2, LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(11); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); + parameters.push_back(std::move(dist)); +} +DataType AdwithinTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AdwithinTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AdwithinTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AdwithinTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==11,"AdwithinTrgeometryTrgeometryLogicalFunction requires 11 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AdwithinTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } +bool AdwithinTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AdwithinTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AdwithinTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(11); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + INVARIANT(c[10].getDataType().isType(DataType::Type::FLOAT64), "dist must be FLOAT64"); + return withChildren(c); +} +SerializableFunction AdwithinTrgeometryTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAdwithinTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==11, + "AdwithinTrgeometryTrgeometryLogicalFunction requires 11 children but got {}", + arguments.children.size()); + return AdwithinTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9]), + std::move(arguments.children[10])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..30828a184f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterStboxStboxLogicalFunction::AfterStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType AfterStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AfterStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AfterStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AfterStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..abe1db46b3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterStboxTspatialLogicalFunction::AfterStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AfterStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AfterStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AfterStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AfterStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..27b78aba9b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterTboxTnumberLogicalFunction::AfterTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AfterTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AfterTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AfterTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AfterTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..8c08e269d7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterTemporalTemporalLogicalFunction::AfterTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AfterTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AfterTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AfterTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AfterTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..a1238508b6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterTnumberTboxLogicalFunction::AfterTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AfterTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AfterTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AfterTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AfterTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..45628fda53 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterTnumberTnumberLogicalFunction::AfterTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType AfterTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "AfterTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "AfterTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return AfterTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..0cb9ee12d2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterTspatialStboxLogicalFunction::AfterTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AfterTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AfterTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AfterTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AfterTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AfterTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AfterTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..b95f836ad2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AfterTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AfterTspatialTspatialLogicalFunction::AfterTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AfterTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AfterTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AfterTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AfterTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AfterTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AfterTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool AfterTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AfterTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AfterTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AfterTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAfterTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AfterTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AfterTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..43a36f048f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AintersectsTcbufferGeoLogicalFunction::AintersectsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AintersectsTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AintersectsTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AintersectsTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AintersectsTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AintersectsTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AintersectsTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AintersectsTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AintersectsTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AintersectsTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AintersectsTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AintersectsTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AintersectsTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..5e656d91d8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AintersectsTcbufferTcbufferLogicalFunction::AintersectsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AintersectsTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AintersectsTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AintersectsTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AintersectsTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AintersectsTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AintersectsTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AintersectsTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AintersectsTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AintersectsTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AintersectsTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AintersectsTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AintersectsTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AintersectsTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..69de89d08c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AintersectsTgeoGeoLogicalFunction::AintersectsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AintersectsTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AintersectsTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AintersectsTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AintersectsTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AintersectsTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AintersectsTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AintersectsTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AintersectsTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AintersectsTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AintersectsTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AintersectsTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AintersectsTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..ad3445f392 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AintersectsTgeoTgeoLogicalFunction::AintersectsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AintersectsTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AintersectsTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AintersectsTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AintersectsTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AintersectsTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AintersectsTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AintersectsTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AintersectsTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AintersectsTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AintersectsTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AintersectsTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AintersectsTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..db016ae4c9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AintersectsTrgeometryGeoLogicalFunction::AintersectsTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType AintersectsTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AintersectsTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AintersectsTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AintersectsTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"AintersectsTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AintersectsTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool AintersectsTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AintersectsTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AintersectsTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction AintersectsTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "AintersectsTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AintersectsTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..6d4c259fa3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,99 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AintersectsTrgeometryTrgeometryLogicalFunction::AintersectsTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} +DataType AintersectsTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AintersectsTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AintersectsTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AintersectsTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==10,"AintersectsTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AintersectsTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } +bool AintersectsTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AintersectsTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AintersectsTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(10); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} +SerializableFunction AintersectsTrgeometryTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAintersectsTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==10, + "AintersectsTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return AintersectsTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..84fa779706 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqBigintTbigintLogicalFunction::AlwaysEqBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..f39aba92a4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqBoolTboolLogicalFunction::AlwaysEqBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..0498e0358c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqFloatTfloatLogicalFunction::AlwaysEqFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..6e8416413f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqGeoTrgeometryLogicalFunction::AlwaysEqGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction AlwaysEqGeoTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector AlwaysEqGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction AlwaysEqGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "AlwaysEqGeoTrgeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view AlwaysEqGeoTrgeometryLogicalFunction::getType() const { return NAME; } + +bool AlwaysEqGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string AlwaysEqGeoTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction AlwaysEqGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + return withChildren(c); +} + +SerializableFunction AlwaysEqGeoTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysEqGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AlwaysEqGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..1a0a8e79e5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqIntTintLogicalFunction::AlwaysEqIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..0b0636d55a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqNpointTnpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqNpointTnpointLogicalFunction::AlwaysEqNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqNpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqNpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqNpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqNpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AlwaysEqNpointTnpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqNpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqNpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqNpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqNpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqNpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqNpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AlwaysEqNpointTnpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AlwaysEqNpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.cpp new file mode 100644 index 0000000000..370be1cde4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqPoseTposeLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqPoseTposeLogicalFunction::AlwaysEqPoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqPoseTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqPoseTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqPoseTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqPoseTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "AlwaysEqPoseTposeLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqPoseTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqPoseTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqPoseTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqPoseTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqPoseTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqPoseTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "AlwaysEqPoseTposeLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return AlwaysEqPoseTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..1c55ef1dab --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTbigintBigintLogicalFunction::AlwaysEqTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysEqTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..037b094d75 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTboolBoolLogicalFunction::AlwaysEqTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysEqTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..8a392c93be --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTcbufferCbufferLogicalFunction::AlwaysEqTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType AlwaysEqTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AlwaysEqTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AlwaysEqTcbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AlwaysEqTcbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..10ff9ff00d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTcbufferTcbufferLogicalFunction::AlwaysEqTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysEqTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AlwaysEqTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AlwaysEqTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AlwaysEqTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..50a03d7f4b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTemporalTemporalLogicalFunction::AlwaysEqTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysEqTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysEqTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysEqTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysEqTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..eb94f48cc6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTextTtextLogicalFunction::AlwaysEqTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..4120f83291 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTfloatFloatLogicalFunction::AlwaysEqTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..5ac92bb901 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTgeoGeoLogicalFunction::AlwaysEqTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AlwaysEqTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AlwaysEqTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AlwaysEqTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AlwaysEqTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..4784d055ab --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTgeoTgeoLogicalFunction::AlwaysEqTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysEqTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysEqTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysEqTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysEqTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.cpp new file mode 100644 index 0000000000..5e82832e2f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTh3indexH3indexLogicalFunction::AlwaysEqTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysEqTh3indexH3indexLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTh3indexH3indexLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTh3indexH3indexLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTh3indexH3indexLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTh3indexH3indexLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTh3indexH3indexLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTh3indexH3indexLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTh3indexH3indexLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTh3indexH3indexLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTh3indexH3indexLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTh3indexH3indexLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTh3indexH3indexLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTh3indexH3indexLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..4749a3efb1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTintIntLogicalFunction::AlwaysEqTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysEqTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.cpp new file mode 100644 index 0000000000..11897ed02b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTjsonbJsonbLogicalFunction::AlwaysEqTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysEqTjsonbJsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTjsonbJsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTjsonbJsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTjsonbJsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTjsonbJsonbLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTjsonbJsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTjsonbJsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTjsonbJsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTjsonbJsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTjsonbJsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTjsonbJsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTjsonbJsonbLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTjsonbJsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.cpp new file mode 100644 index 0000000000..0917e6c5d3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTjsonbTjsonbLogicalFunction::AlwaysEqTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(json0)); + parameters.push_back(std::move(ts0)); +} + +DataType AlwaysEqTjsonbTjsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTjsonbTjsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTjsonbTjsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTjsonbTjsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AlwaysEqTjsonbTjsonbLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTjsonbTjsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTjsonbTjsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTjsonbTjsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTjsonbTjsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTjsonbTjsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTjsonbTjsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AlwaysEqTjsonbTjsonbLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AlwaysEqTjsonbTjsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.cpp new file mode 100644 index 0000000000..0cfae443c3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointNpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTnpointNpointLogicalFunction::AlwaysEqTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); +} + +DataType AlwaysEqTnpointNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTnpointNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTnpointNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTnpointNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AlwaysEqTnpointNpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTnpointNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTnpointNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTnpointNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTnpointNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTnpointNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTnpointNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AlwaysEqTnpointNpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AlwaysEqTnpointNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..f91e1a2814 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTnpointTnpointLogicalFunction::AlwaysEqTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(ts0)); +} + +DataType AlwaysEqTnpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTnpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTnpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTnpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysEqTnpointTnpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTnpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTnpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTnpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTnpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTnpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTnpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysEqTnpointTnpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysEqTnpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTposePoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTposePoseLogicalFunction.cpp new file mode 100644 index 0000000000..1d4ee6365c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTposePoseLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTposePoseLogicalFunction::AlwaysEqTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); +} + +DataType AlwaysEqTposePoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTposePoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTposePoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTposePoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "AlwaysEqTposePoseLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTposePoseLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTposePoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTposePoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTposePoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTposePoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTposePoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "AlwaysEqTposePoseLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return AlwaysEqTposePoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.cpp new file mode 100644 index 0000000000..9f1b7aae10 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTposeTposeLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTposeTposeLogicalFunction::AlwaysEqTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(ts0)); +} + +DataType AlwaysEqTposeTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTposeTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTposeTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTposeTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AlwaysEqTposeTposeLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTposeTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTposeTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTposeTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTposeTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTposeTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTposeTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AlwaysEqTposeTposeLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AlwaysEqTposeTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.cpp new file mode 100644 index 0000000000..c88065550c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTquadbinQuadbinLogicalFunction::AlwaysEqTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysEqTquadbinQuadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTquadbinQuadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTquadbinQuadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTquadbinQuadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTquadbinQuadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTquadbinQuadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTquadbinQuadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTquadbinQuadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTquadbinQuadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTquadbinQuadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTquadbinQuadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTquadbinQuadbinLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTquadbinQuadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..7fe52206ad --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTrgeometryGeoLogicalFunction::AlwaysEqTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType AlwaysEqTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction AlwaysEqTrgeometryGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector AlwaysEqTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction AlwaysEqTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "AlwaysEqTrgeometryGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view AlwaysEqTrgeometryGeoLogicalFunction::getType() const { return NAME; } + +bool AlwaysEqTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string AlwaysEqTrgeometryGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction AlwaysEqTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} + +SerializableFunction AlwaysEqTrgeometryGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysEqTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AlwaysEqTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..e24340ca8e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTrgeometryTrgeometryLogicalFunction::AlwaysEqTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} + +DataType AlwaysEqTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction AlwaysEqTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector AlwaysEqTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction AlwaysEqTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 10, + "AlwaysEqTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view AlwaysEqTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } + +bool AlwaysEqTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string AlwaysEqTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction AlwaysEqTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(10); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} + +SerializableFunction AlwaysEqTrgeometryTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 10, + "AlwaysEqTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return AlwaysEqTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysEqTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysEqTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..b06f6a67a5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysEqTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysEqTtextTextLogicalFunction::AlwaysEqTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysEqTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysEqTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysEqTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysEqTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysEqTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysEqTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysEqTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysEqTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysEqTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysEqTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysEqTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysEqTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysEqTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..c73c18e4dd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeBigintTbigintLogicalFunction::AlwaysGeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGeBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..06450079ca --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeFloatTfloatLogicalFunction::AlwaysGeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..4bc618fcce --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeIntTintLogicalFunction::AlwaysGeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..808c7621b0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeTbigintBigintLogicalFunction::AlwaysGeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysGeTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..563393d415 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeTemporalTemporalLogicalFunction::AlwaysGeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysGeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysGeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysGeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysGeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..baff50d0e5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeTextTtextLogicalFunction::AlwaysGeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..b8bbebbcfa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeTfloatFloatLogicalFunction::AlwaysGeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..b75199138f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeTintIntLogicalFunction::AlwaysGeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..f9fdc19f39 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGeTtextTextLogicalFunction::AlwaysGeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysGeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..ee0e4c4d8e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtBigintTbigintLogicalFunction::AlwaysGtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGtBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..34f0f5d9e9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtFloatTfloatLogicalFunction::AlwaysGtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGtFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..01e4377ff7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtIntTintLogicalFunction::AlwaysGtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGtIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..e6389084f5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtTbigintBigintLogicalFunction::AlwaysGtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysGtTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..1d8eb682c4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtTemporalTemporalLogicalFunction::AlwaysGtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysGtTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysGtTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysGtTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysGtTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..9594e8b49b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtTextTtextLogicalFunction::AlwaysGtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGtTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..33f9d132fc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtTfloatFloatLogicalFunction::AlwaysGtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGtTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..9a91b7030f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtTintIntLogicalFunction::AlwaysGtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysGtTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysGtTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysGtTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..f7bdd665f1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysGtTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysGtTtextTextLogicalFunction::AlwaysGtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysGtTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysGtTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysGtTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysGtTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysGtTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysGtTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysGtTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysGtTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysGtTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysGtTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysGtTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysGtTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysGtTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..6a174f4fe5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeBigintTbigintLogicalFunction::AlwaysLeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLeBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..2f8e314b9c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeFloatTfloatLogicalFunction::AlwaysLeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..650e8c1a36 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeIntTintLogicalFunction::AlwaysLeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..ca7ba6dac4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeTbigintBigintLogicalFunction::AlwaysLeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysLeTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..9234967d2d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeTemporalTemporalLogicalFunction::AlwaysLeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysLeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysLeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysLeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysLeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..dea9012d7c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeTextTtextLogicalFunction::AlwaysLeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..31762a79b2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeTfloatFloatLogicalFunction::AlwaysLeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..b587763fae --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeTintIntLogicalFunction::AlwaysLeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..2250671e94 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLeTtextTextLogicalFunction::AlwaysLeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysLeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..a79a3d1f23 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtBigintTbigintLogicalFunction::AlwaysLtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLtBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..decd324213 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtFloatTfloatLogicalFunction::AlwaysLtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLtFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..e5f0374c93 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtIntTintLogicalFunction::AlwaysLtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLtIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..394fc13f75 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtTbigintBigintLogicalFunction::AlwaysLtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysLtTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..cda9d47016 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtTemporalTemporalLogicalFunction::AlwaysLtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysLtTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysLtTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysLtTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysLtTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..820295de5e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtTextTtextLogicalFunction::AlwaysLtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLtTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..7c76ec2d3f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtTfloatFloatLogicalFunction::AlwaysLtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLtTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..e4644024f8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtTintIntLogicalFunction::AlwaysLtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysLtTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysLtTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysLtTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..bc0d552a89 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysLtTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysLtTtextTextLogicalFunction::AlwaysLtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysLtTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysLtTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysLtTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysLtTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysLtTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysLtTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysLtTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysLtTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysLtTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysLtTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysLtTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysLtTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysLtTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..c1ed787d86 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeBigintTbigintLogicalFunction::AlwaysNeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..3047929016 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeBoolTboolLogicalFunction::AlwaysNeBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..2f3a0bdc7d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeFloatTfloatLogicalFunction::AlwaysNeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..2595e70e93 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeGeoTrgeometryLogicalFunction::AlwaysNeGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction AlwaysNeGeoTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector AlwaysNeGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction AlwaysNeGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "AlwaysNeGeoTrgeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view AlwaysNeGeoTrgeometryLogicalFunction::getType() const { return NAME; } + +bool AlwaysNeGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string AlwaysNeGeoTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction AlwaysNeGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + return withChildren(c); +} + +SerializableFunction AlwaysNeGeoTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysNeGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AlwaysNeGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..df6decbb9c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeIntTintLogicalFunction::AlwaysNeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..3f3f85c6b7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeNpointTnpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeNpointTnpointLogicalFunction::AlwaysNeNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeNpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeNpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeNpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeNpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AlwaysNeNpointTnpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeNpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeNpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeNpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeNpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeNpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeNpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AlwaysNeNpointTnpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AlwaysNeNpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNePoseTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNePoseTposeLogicalFunction.cpp new file mode 100644 index 0000000000..9434641a7c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNePoseTposeLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNePoseTposeLogicalFunction::AlwaysNePoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNePoseTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNePoseTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNePoseTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNePoseTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "AlwaysNePoseTposeLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNePoseTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNePoseTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNePoseTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNePoseTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNePoseTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNePoseTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "AlwaysNePoseTposeLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return AlwaysNePoseTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..66288b7065 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTbigintBigintLogicalFunction::AlwaysNeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysNeTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..48c09191e0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTboolBoolLogicalFunction::AlwaysNeTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysNeTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..889bdff13c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTcbufferCbufferLogicalFunction::AlwaysNeTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType AlwaysNeTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AlwaysNeTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AlwaysNeTcbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AlwaysNeTcbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..7ef37621f2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTcbufferTcbufferLogicalFunction::AlwaysNeTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysNeTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AlwaysNeTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AlwaysNeTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AlwaysNeTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..4ef6c23377 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTemporalTemporalLogicalFunction::AlwaysNeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysNeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysNeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysNeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysNeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..9db020d0d3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTextTtextLogicalFunction::AlwaysNeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..95ec8e9698 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTfloatFloatLogicalFunction::AlwaysNeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..0293265041 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTgeoGeoLogicalFunction::AlwaysNeTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AlwaysNeTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AlwaysNeTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AlwaysNeTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AlwaysNeTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..829b58a41c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTgeoTgeoLogicalFunction::AlwaysNeTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AlwaysNeTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysNeTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysNeTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysNeTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.cpp new file mode 100644 index 0000000000..6fdf166bdb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTh3indexH3indexLogicalFunction::AlwaysNeTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysNeTh3indexH3indexLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTh3indexH3indexLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTh3indexH3indexLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTh3indexH3indexLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTh3indexH3indexLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTh3indexH3indexLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTh3indexH3indexLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTh3indexH3indexLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTh3indexH3indexLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTh3indexH3indexLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTh3indexH3indexLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTh3indexH3indexLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTh3indexH3indexLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..338ed1cff6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTintIntLogicalFunction::AlwaysNeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType AlwaysNeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.cpp new file mode 100644 index 0000000000..41d5894d68 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTjsonbJsonbLogicalFunction::AlwaysNeTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysNeTjsonbJsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTjsonbJsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTjsonbJsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTjsonbJsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTjsonbJsonbLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTjsonbJsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTjsonbJsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTjsonbJsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTjsonbJsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTjsonbJsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTjsonbJsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTjsonbJsonbLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTjsonbJsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.cpp new file mode 100644 index 0000000000..557d2334b3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTjsonbTjsonbLogicalFunction::AlwaysNeTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(json0)); + parameters.push_back(std::move(ts0)); +} + +DataType AlwaysNeTjsonbTjsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTjsonbTjsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTjsonbTjsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTjsonbTjsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AlwaysNeTjsonbTjsonbLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTjsonbTjsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTjsonbTjsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTjsonbTjsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTjsonbTjsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTjsonbTjsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTjsonbTjsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AlwaysNeTjsonbTjsonbLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AlwaysNeTjsonbTjsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.cpp new file mode 100644 index 0000000000..390c2a89a0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointNpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTnpointNpointLogicalFunction::AlwaysNeTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); +} + +DataType AlwaysNeTnpointNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTnpointNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTnpointNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTnpointNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AlwaysNeTnpointNpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTnpointNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTnpointNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTnpointNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTnpointNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTnpointNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTnpointNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AlwaysNeTnpointNpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AlwaysNeTnpointNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..8b01f20f92 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTnpointTnpointLogicalFunction::AlwaysNeTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(ts0)); +} + +DataType AlwaysNeTnpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTnpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTnpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTnpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AlwaysNeTnpointTnpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTnpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTnpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTnpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTnpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTnpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTnpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysNeTnpointTnpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AlwaysNeTnpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTposePoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTposePoseLogicalFunction.cpp new file mode 100644 index 0000000000..447da2fcbe --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTposePoseLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTposePoseLogicalFunction::AlwaysNeTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); +} + +DataType AlwaysNeTposePoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTposePoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTposePoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTposePoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "AlwaysNeTposePoseLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTposePoseLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTposePoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTposePoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTposePoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTposePoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTposePoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "AlwaysNeTposePoseLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return AlwaysNeTposePoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.cpp new file mode 100644 index 0000000000..b70d438a5a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTposeTposeLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTposeTposeLogicalFunction::AlwaysNeTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(ts0)); +} + +DataType AlwaysNeTposeTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTposeTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTposeTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTposeTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AlwaysNeTposeTposeLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTposeTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTposeTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTposeTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTposeTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTposeTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTposeTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AlwaysNeTposeTposeLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AlwaysNeTposeTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.cpp new file mode 100644 index 0000000000..ea6b1097c3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTquadbinQuadbinLogicalFunction::AlwaysNeTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysNeTquadbinQuadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTquadbinQuadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTquadbinQuadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTquadbinQuadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTquadbinQuadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTquadbinQuadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTquadbinQuadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTquadbinQuadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTquadbinQuadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTquadbinQuadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTquadbinQuadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTquadbinQuadbinLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTquadbinQuadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..e0440066d2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTrgeometryGeoLogicalFunction::AlwaysNeTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType AlwaysNeTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction AlwaysNeTrgeometryGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector AlwaysNeTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction AlwaysNeTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "AlwaysNeTrgeometryGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view AlwaysNeTrgeometryGeoLogicalFunction::getType() const { return NAME; } + +bool AlwaysNeTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string AlwaysNeTrgeometryGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction AlwaysNeTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} + +SerializableFunction AlwaysNeTrgeometryGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AlwaysNeTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AlwaysNeTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..be1f419995 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTrgeometryTrgeometryLogicalFunction::AlwaysNeTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} + +DataType AlwaysNeTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction AlwaysNeTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector AlwaysNeTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction AlwaysNeTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 10, + "AlwaysNeTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view AlwaysNeTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } + +bool AlwaysNeTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string AlwaysNeTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction AlwaysNeTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(10); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} + +SerializableFunction AlwaysNeTrgeometryTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 10, + "AlwaysNeTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return AlwaysNeTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AlwaysNeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AlwaysNeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..dc0fd41e1c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AlwaysNeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AlwaysNeTtextTextLogicalFunction::AlwaysNeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType AlwaysNeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AlwaysNeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AlwaysNeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AlwaysNeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "AlwaysNeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AlwaysNeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool AlwaysNeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AlwaysNeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AlwaysNeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AlwaysNeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAlwaysNeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "AlwaysNeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return AlwaysNeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..2e59e67f80 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AtouchesTcbufferGeoLogicalFunction::AtouchesTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AtouchesTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AtouchesTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AtouchesTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AtouchesTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "AtouchesTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AtouchesTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AtouchesTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AtouchesTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AtouchesTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AtouchesTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "AtouchesTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return AtouchesTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..39c0934ef1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AtouchesTcbufferTcbufferLogicalFunction::AtouchesTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType AtouchesTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AtouchesTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AtouchesTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AtouchesTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "AtouchesTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AtouchesTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool AtouchesTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AtouchesTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AtouchesTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AtouchesTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "AtouchesTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return AtouchesTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AtouchesTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..94cbac9aee --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AtouchesTgeoGeoLogicalFunction::AtouchesTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AtouchesTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AtouchesTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AtouchesTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AtouchesTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AtouchesTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AtouchesTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AtouchesTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AtouchesTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AtouchesTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AtouchesTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AtouchesTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AtouchesTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..66c0286eaa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AtouchesTgeoTgeoLogicalFunction::AtouchesTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType AtouchesTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AtouchesTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AtouchesTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AtouchesTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "AtouchesTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AtouchesTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AtouchesTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AtouchesTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AtouchesTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AtouchesTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "AtouchesTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return AtouchesTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AtouchesTpointGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTpointGeoLogicalFunction.cpp new file mode 100644 index 0000000000..267f4fd942 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTpointGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AtouchesTpointGeoLogicalFunction::AtouchesTpointGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType AtouchesTpointGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction AtouchesTpointGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector AtouchesTpointGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction AtouchesTpointGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "AtouchesTpointGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view AtouchesTpointGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool AtouchesTpointGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string AtouchesTpointGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction AtouchesTpointGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction AtouchesTpointGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTpointGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "AtouchesTpointGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return AtouchesTpointGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..b9f1ab3fa5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/AtouchesTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +AtouchesTrgeometryGeoLogicalFunction::AtouchesTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType AtouchesTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction AtouchesTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector AtouchesTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction AtouchesTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"AtouchesTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view AtouchesTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool AtouchesTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string AtouchesTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction AtouchesTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction AtouchesTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterAtouchesTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "AtouchesTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return AtouchesTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BackStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BackStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..1e034c09ca --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BackStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BackStboxStboxLogicalFunction::BackStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType BackStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BackStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BackStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BackStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "BackStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BackStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BackStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BackStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BackStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BackStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBackStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "BackStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return BackStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BackStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BackStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..f92e6c6c02 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BackStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BackStboxTspatialLogicalFunction::BackStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BackStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BackStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BackStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BackStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "BackStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BackStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool BackStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BackStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BackStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BackStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBackStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "BackStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return BackStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BackTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BackTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..b11fab303c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BackTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BackTspatialStboxLogicalFunction::BackTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BackTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BackTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BackTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BackTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "BackTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BackTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BackTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BackTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BackTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BackTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBackTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "BackTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return BackTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BackTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BackTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..b343129ae4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BackTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BackTspatialTspatialLogicalFunction::BackTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType BackTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BackTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BackTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BackTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "BackTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BackTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool BackTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BackTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BackTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BackTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBackTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "BackTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return BackTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..ee3a496776 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeStboxStboxLogicalFunction::BeforeStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType BeforeStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "BeforeStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "BeforeStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return BeforeStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..af952752bd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeStboxTspatialLogicalFunction::BeforeStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BeforeStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "BeforeStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "BeforeStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return BeforeStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..5688fa4f54 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeTboxTnumberLogicalFunction::BeforeTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BeforeTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "BeforeTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "BeforeTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return BeforeTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..e57478eee5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeTemporalTemporalLogicalFunction::BeforeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType BeforeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "BeforeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "BeforeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return BeforeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..1296402088 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeTnumberTboxLogicalFunction::BeforeTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BeforeTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "BeforeTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "BeforeTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return BeforeTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..a20e950669 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeTnumberTnumberLogicalFunction::BeforeTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType BeforeTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "BeforeTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "BeforeTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return BeforeTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..61afaf241d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeTspatialStboxLogicalFunction::BeforeTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BeforeTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "BeforeTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "BeforeTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return BeforeTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BeforeTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BeforeTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..82d6652dbb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BeforeTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BeforeTspatialTspatialLogicalFunction::BeforeTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType BeforeTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BeforeTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BeforeTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BeforeTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "BeforeTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BeforeTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool BeforeTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BeforeTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BeforeTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BeforeTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBeforeTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "BeforeTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return BeforeTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BelowStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BelowStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..33b643a0f1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BelowStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BelowStboxStboxLogicalFunction::BelowStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType BelowStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BelowStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BelowStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BelowStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "BelowStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BelowStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BelowStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BelowStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BelowStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BelowStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBelowStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "BelowStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return BelowStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BelowStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BelowStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..0b280d7387 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BelowStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BelowStboxTspatialLogicalFunction::BelowStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BelowStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BelowStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BelowStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BelowStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "BelowStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BelowStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool BelowStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BelowStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BelowStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BelowStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBelowStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "BelowStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return BelowStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BelowTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BelowTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..994dfe384b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BelowTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BelowTspatialStboxLogicalFunction::BelowTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType BelowTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BelowTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BelowTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BelowTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "BelowTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BelowTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool BelowTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BelowTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BelowTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BelowTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBelowTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "BelowTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return BelowTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/BelowTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/BelowTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..9f9307e627 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/BelowTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +BelowTspatialTspatialLogicalFunction::BelowTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType BelowTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction BelowTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector BelowTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction BelowTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "BelowTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view BelowTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool BelowTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string BelowTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction BelowTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction BelowTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterBelowTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "BelowTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return BelowTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/CMakeLists.txt b/nes-logical-operators/src/Functions/Meos/CMakeLists.txt index 474ba11608..c6601d4cf1 100644 --- a/nes-logical-operators/src/Functions/Meos/CMakeLists.txt +++ b/nes-logical-operators/src/Functions/Meos/CMakeLists.txt @@ -18,3 +18,768 @@ add_plugin(TemporalAIntersectsGeometry LogicalFunction nes-logical-operators Tem add_plugin(TemporalEContainsGeometry LogicalFunction nes-logical-operators TemporalEContainsGeometryLogicalFunction.cpp) add_plugin(TemporalEDWithinGeometry LogicalFunction nes-logical-operators TemporalEDWithinGeometryLogicalFunction.cpp) add_plugin(TemporalAtStBox LogicalFunction nes-logical-operators TemporalAtStBoxLogicalFunction.cpp) +add_plugin(TfloatCeil LogicalFunction nes-logical-operators TfloatCeilLogicalFunction.cpp) +add_plugin(TfloatExp LogicalFunction nes-logical-operators TfloatExpLogicalFunction.cpp) +add_plugin(TfloatFloor LogicalFunction nes-logical-operators TfloatFloorLogicalFunction.cpp) +add_plugin(TfloatLn LogicalFunction nes-logical-operators TfloatLnLogicalFunction.cpp) +add_plugin(TfloatLog10 LogicalFunction nes-logical-operators TfloatLog10LogicalFunction.cpp) +add_plugin(TfloatRadians LogicalFunction nes-logical-operators TfloatRadiansLogicalFunction.cpp) +add_plugin(TfloatToTint LogicalFunction nes-logical-operators TfloatToTintLogicalFunction.cpp) +add_plugin(TintToTfloat LogicalFunction nes-logical-operators TintToTfloatLogicalFunction.cpp) +add_plugin(AddTfloatFloat LogicalFunction nes-logical-operators AddTfloatFloatLogicalFunction.cpp) +add_plugin(SubTfloatFloat LogicalFunction nes-logical-operators SubTfloatFloatLogicalFunction.cpp) +add_plugin(MulTfloatFloat LogicalFunction nes-logical-operators MulTfloatFloatLogicalFunction.cpp) +add_plugin(DivTfloatFloat LogicalFunction nes-logical-operators DivTfloatFloatLogicalFunction.cpp) +add_plugin(AddTintInt LogicalFunction nes-logical-operators AddTintIntLogicalFunction.cpp) +add_plugin(SubTintInt LogicalFunction nes-logical-operators SubTintIntLogicalFunction.cpp) +add_plugin(MulTintInt LogicalFunction nes-logical-operators MulTintIntLogicalFunction.cpp) +add_plugin(DivTintInt LogicalFunction nes-logical-operators DivTintIntLogicalFunction.cpp) +add_plugin(AddFloatTfloat LogicalFunction nes-logical-operators AddFloatTfloatLogicalFunction.cpp) +add_plugin(SubFloatTfloat LogicalFunction nes-logical-operators SubFloatTfloatLogicalFunction.cpp) +add_plugin(MulFloatTfloat LogicalFunction nes-logical-operators MulFloatTfloatLogicalFunction.cpp) +add_plugin(DivFloatTfloat LogicalFunction nes-logical-operators DivFloatTfloatLogicalFunction.cpp) +add_plugin(AddIntTint LogicalFunction nes-logical-operators AddIntTintLogicalFunction.cpp) +add_plugin(SubIntTint LogicalFunction nes-logical-operators SubIntTintLogicalFunction.cpp) +add_plugin(MulIntTint LogicalFunction nes-logical-operators MulIntTintLogicalFunction.cpp) +add_plugin(DivIntTint LogicalFunction nes-logical-operators DivIntTintLogicalFunction.cpp) +add_plugin(AddTbigintBigint LogicalFunction nes-logical-operators AddTbigintBigintLogicalFunction.cpp) +add_plugin(SubTbigintBigint LogicalFunction nes-logical-operators SubTbigintBigintLogicalFunction.cpp) +add_plugin(MulTbigintBigint LogicalFunction nes-logical-operators MulTbigintBigintLogicalFunction.cpp) +add_plugin(DivTbigintBigint LogicalFunction nes-logical-operators DivTbigintBigintLogicalFunction.cpp) +add_plugin(AddBigintTbigint LogicalFunction nes-logical-operators AddBigintTbigintLogicalFunction.cpp) +add_plugin(SubBigintTbigint LogicalFunction nes-logical-operators SubBigintTbigintLogicalFunction.cpp) +add_plugin(MulBigintTbigint LogicalFunction nes-logical-operators MulBigintTbigintLogicalFunction.cpp) +add_plugin(DivBigintTbigint LogicalFunction nes-logical-operators DivBigintTbigintLogicalFunction.cpp) +add_plugin(AddTnumberTnumber LogicalFunction nes-logical-operators AddTnumberTnumberLogicalFunction.cpp) +add_plugin(SubTnumberTnumber LogicalFunction nes-logical-operators SubTnumberTnumberLogicalFunction.cpp) +add_plugin(MulTnumberTnumber LogicalFunction nes-logical-operators MulTnumberTnumberLogicalFunction.cpp) +add_plugin(DivTnumberTnumber LogicalFunction nes-logical-operators DivTnumberTnumberLogicalFunction.cpp) +add_plugin(TfloatShiftValue LogicalFunction nes-logical-operators TfloatShiftValueLogicalFunction.cpp) +add_plugin(TfloatScaleValue LogicalFunction nes-logical-operators TfloatScaleValueLogicalFunction.cpp) +add_plugin(TfloatShiftScaleValue LogicalFunction nes-logical-operators TfloatShiftScaleValueLogicalFunction.cpp) +add_plugin(TintShiftValue LogicalFunction nes-logical-operators TintShiftValueLogicalFunction.cpp) +add_plugin(TintScaleValue LogicalFunction nes-logical-operators TintScaleValueLogicalFunction.cpp) +add_plugin(TintShiftScaleValue LogicalFunction nes-logical-operators TintShiftScaleValueLogicalFunction.cpp) +add_plugin(TbigintShiftValue LogicalFunction nes-logical-operators TbigintShiftValueLogicalFunction.cpp) +add_plugin(TbigintScaleValue LogicalFunction nes-logical-operators TbigintScaleValueLogicalFunction.cpp) +add_plugin(TbigintShiftScaleValue LogicalFunction nes-logical-operators TbigintShiftScaleValueLogicalFunction.cpp) +add_plugin(TdistanceTfloatFloat LogicalFunction nes-logical-operators TdistanceTfloatFloatLogicalFunction.cpp) +add_plugin(TdistanceTintInt LogicalFunction nes-logical-operators TdistanceTintIntLogicalFunction.cpp) +add_plugin(TdistanceTnumberTnumber LogicalFunction nes-logical-operators TdistanceTnumberTnumberLogicalFunction.cpp) +add_plugin(TemporalRound LogicalFunction nes-logical-operators TemporalRoundLogicalFunction.cpp) +add_plugin(EverEqTbigintBigint LogicalFunction nes-logical-operators EverEqTbigintBigintLogicalFunction.cpp) +add_plugin(EverNeTbigintBigint LogicalFunction nes-logical-operators EverNeTbigintBigintLogicalFunction.cpp) +add_plugin(EverLtTbigintBigint LogicalFunction nes-logical-operators EverLtTbigintBigintLogicalFunction.cpp) +add_plugin(EverLeTbigintBigint LogicalFunction nes-logical-operators EverLeTbigintBigintLogicalFunction.cpp) +add_plugin(EverGtTbigintBigint LogicalFunction nes-logical-operators EverGtTbigintBigintLogicalFunction.cpp) +add_plugin(EverGeTbigintBigint LogicalFunction nes-logical-operators EverGeTbigintBigintLogicalFunction.cpp) +add_plugin(AlwaysEqTbigintBigint LogicalFunction nes-logical-operators AlwaysEqTbigintBigintLogicalFunction.cpp) +add_plugin(AlwaysNeTbigintBigint LogicalFunction nes-logical-operators AlwaysNeTbigintBigintLogicalFunction.cpp) +add_plugin(AlwaysLtTbigintBigint LogicalFunction nes-logical-operators AlwaysLtTbigintBigintLogicalFunction.cpp) +add_plugin(AlwaysLeTbigintBigint LogicalFunction nes-logical-operators AlwaysLeTbigintBigintLogicalFunction.cpp) +add_plugin(AlwaysGtTbigintBigint LogicalFunction nes-logical-operators AlwaysGtTbigintBigintLogicalFunction.cpp) +add_plugin(AlwaysGeTbigintBigint LogicalFunction nes-logical-operators AlwaysGeTbigintBigintLogicalFunction.cpp) +add_plugin(EverEqBigintTbigint LogicalFunction nes-logical-operators EverEqBigintTbigintLogicalFunction.cpp) +add_plugin(EverNeBigintTbigint LogicalFunction nes-logical-operators EverNeBigintTbigintLogicalFunction.cpp) +add_plugin(EverLtBigintTbigint LogicalFunction nes-logical-operators EverLtBigintTbigintLogicalFunction.cpp) +add_plugin(EverLeBigintTbigint LogicalFunction nes-logical-operators EverLeBigintTbigintLogicalFunction.cpp) +add_plugin(EverGtBigintTbigint LogicalFunction nes-logical-operators EverGtBigintTbigintLogicalFunction.cpp) +add_plugin(EverGeBigintTbigint LogicalFunction nes-logical-operators EverGeBigintTbigintLogicalFunction.cpp) +add_plugin(AlwaysEqBigintTbigint LogicalFunction nes-logical-operators AlwaysEqBigintTbigintLogicalFunction.cpp) +add_plugin(AlwaysNeBigintTbigint LogicalFunction nes-logical-operators AlwaysNeBigintTbigintLogicalFunction.cpp) +add_plugin(AlwaysLtBigintTbigint LogicalFunction nes-logical-operators AlwaysLtBigintTbigintLogicalFunction.cpp) +add_plugin(AlwaysLeBigintTbigint LogicalFunction nes-logical-operators AlwaysLeBigintTbigintLogicalFunction.cpp) +add_plugin(AlwaysGtBigintTbigint LogicalFunction nes-logical-operators AlwaysGtBigintTbigintLogicalFunction.cpp) +add_plugin(AlwaysGeBigintTbigint LogicalFunction nes-logical-operators AlwaysGeBigintTbigintLogicalFunction.cpp) +add_plugin(EverEqTboolBool LogicalFunction nes-logical-operators EverEqTboolBoolLogicalFunction.cpp) +add_plugin(EverNeTboolBool LogicalFunction nes-logical-operators EverNeTboolBoolLogicalFunction.cpp) +add_plugin(AlwaysEqTboolBool LogicalFunction nes-logical-operators AlwaysEqTboolBoolLogicalFunction.cpp) +add_plugin(AlwaysNeTboolBool LogicalFunction nes-logical-operators AlwaysNeTboolBoolLogicalFunction.cpp) +add_plugin(EverEqBoolTbool LogicalFunction nes-logical-operators EverEqBoolTboolLogicalFunction.cpp) +add_plugin(EverNeBoolTbool LogicalFunction nes-logical-operators EverNeBoolTboolLogicalFunction.cpp) +add_plugin(AlwaysEqBoolTbool LogicalFunction nes-logical-operators AlwaysEqBoolTboolLogicalFunction.cpp) +add_plugin(AlwaysNeBoolTbool LogicalFunction nes-logical-operators AlwaysNeBoolTboolLogicalFunction.cpp) +add_plugin(TbigintToTint LogicalFunction nes-logical-operators TbigintToTintLogicalFunction.cpp) +add_plugin(TbigintToTfloat LogicalFunction nes-logical-operators TbigintToTfloatLogicalFunction.cpp) +add_plugin(TintToTbigint LogicalFunction nes-logical-operators TintToTbigintLogicalFunction.cpp) +add_plugin(TfloatToTbigint LogicalFunction nes-logical-operators TfloatToTbigintLogicalFunction.cpp) +add_plugin(TboolToTint LogicalFunction nes-logical-operators TboolToTintLogicalFunction.cpp) +add_plugin(TnotTbool LogicalFunction nes-logical-operators TnotTboolLogicalFunction.cpp) +add_plugin(TandTboolBool LogicalFunction nes-logical-operators TandTboolBoolLogicalFunction.cpp) +add_plugin(TorTboolBool LogicalFunction nes-logical-operators TorTboolBoolLogicalFunction.cpp) +add_plugin(TeqTboolBool LogicalFunction nes-logical-operators TeqTboolBoolLogicalFunction.cpp) +add_plugin(TneTboolBool LogicalFunction nes-logical-operators TneTboolBoolLogicalFunction.cpp) +add_plugin(TandBoolTbool LogicalFunction nes-logical-operators TandBoolTboolLogicalFunction.cpp) +add_plugin(TorBoolTbool LogicalFunction nes-logical-operators TorBoolTboolLogicalFunction.cpp) +add_plugin(TeqBoolTbool LogicalFunction nes-logical-operators TeqBoolTboolLogicalFunction.cpp) +add_plugin(TneBoolTbool LogicalFunction nes-logical-operators TneBoolTboolLogicalFunction.cpp) +add_plugin(TandTboolTbool LogicalFunction nes-logical-operators TandTboolTboolLogicalFunction.cpp) +add_plugin(TorTboolTbool LogicalFunction nes-logical-operators TorTboolTboolLogicalFunction.cpp) +add_plugin(EcoversTgeoGeo LogicalFunction nes-logical-operators EcoversTgeoGeoLogicalFunction.cpp) +add_plugin(EdisjointTgeoGeo LogicalFunction nes-logical-operators EdisjointTgeoGeoLogicalFunction.cpp) +add_plugin(EdwithinTgeoGeo LogicalFunction nes-logical-operators EdwithinTgeoGeoLogicalFunction.cpp) +add_plugin(NadTgeoTgeo LogicalFunction nes-logical-operators NadTgeoTgeoLogicalFunction.cpp) +add_plugin(EcontainsTcbufferTcbuffer LogicalFunction nes-logical-operators EcontainsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AcontainsTcbufferTcbuffer LogicalFunction nes-logical-operators AcontainsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EdisjointTcbufferTcbuffer LogicalFunction nes-logical-operators EdisjointTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EdwithinTcbufferCbuffer LogicalFunction nes-logical-operators EdwithinTcbufferCbufferLogicalFunction.cpp) +add_plugin(AdwithinTcbufferCbuffer LogicalFunction nes-logical-operators AdwithinTcbufferCbufferLogicalFunction.cpp) +add_plugin(AcontainsTgeoGeo LogicalFunction nes-logical-operators AcontainsTgeoGeoLogicalFunction.cpp) +add_plugin(AcoversTgeoGeo LogicalFunction nes-logical-operators AcoversTgeoGeoLogicalFunction.cpp) +add_plugin(AdisjointTgeoGeo LogicalFunction nes-logical-operators AdisjointTgeoGeoLogicalFunction.cpp) +add_plugin(AintersectsTgeoGeo LogicalFunction nes-logical-operators AintersectsTgeoGeoLogicalFunction.cpp) +add_plugin(AtouchesTgeoGeo LogicalFunction nes-logical-operators AtouchesTgeoGeoLogicalFunction.cpp) +add_plugin(EcontainsTgeoGeo LogicalFunction nes-logical-operators EcontainsTgeoGeoLogicalFunction.cpp) +add_plugin(EcoversTgeoGeo LogicalFunction nes-logical-operators EcoversTgeoGeoLogicalFunction.cpp) +add_plugin(EdisjointTgeoGeo LogicalFunction nes-logical-operators EdisjointTgeoGeoLogicalFunction.cpp) +add_plugin(EintersectsTgeoGeo LogicalFunction nes-logical-operators EintersectsTgeoGeoLogicalFunction.cpp) +add_plugin(EtouchesTgeoGeo LogicalFunction nes-logical-operators EtouchesTgeoGeoLogicalFunction.cpp) +add_plugin(EverEqTgeoGeo LogicalFunction nes-logical-operators EverEqTgeoGeoLogicalFunction.cpp) +add_plugin(EverNeTgeoGeo LogicalFunction nes-logical-operators EverNeTgeoGeoLogicalFunction.cpp) +add_plugin(AlwaysEqTgeoGeo LogicalFunction nes-logical-operators AlwaysEqTgeoGeoLogicalFunction.cpp) +add_plugin(AlwaysNeTgeoGeo LogicalFunction nes-logical-operators AlwaysNeTgeoGeoLogicalFunction.cpp) +add_plugin(NadTgeoGeo LogicalFunction nes-logical-operators NadTgeoGeoLogicalFunction.cpp) +add_plugin(EdwithinTgeoGeo LogicalFunction nes-logical-operators EdwithinTgeoGeoLogicalFunction.cpp) +add_plugin(AdwithinTgeoGeo LogicalFunction nes-logical-operators AdwithinTgeoGeoLogicalFunction.cpp) +add_plugin(AcontainsTgeoTgeo LogicalFunction nes-logical-operators AcontainsTgeoTgeoLogicalFunction.cpp) +add_plugin(AcoversTgeoTgeo LogicalFunction nes-logical-operators AcoversTgeoTgeoLogicalFunction.cpp) +add_plugin(AdisjointTgeoTgeo LogicalFunction nes-logical-operators AdisjointTgeoTgeoLogicalFunction.cpp) +add_plugin(AintersectsTgeoTgeo LogicalFunction nes-logical-operators AintersectsTgeoTgeoLogicalFunction.cpp) +add_plugin(AtouchesTgeoTgeo LogicalFunction nes-logical-operators AtouchesTgeoTgeoLogicalFunction.cpp) +add_plugin(EcontainsTgeoTgeo LogicalFunction nes-logical-operators EcontainsTgeoTgeoLogicalFunction.cpp) +add_plugin(EcoversTgeoTgeo LogicalFunction nes-logical-operators EcoversTgeoTgeoLogicalFunction.cpp) +add_plugin(EdisjointTgeoTgeo LogicalFunction nes-logical-operators EdisjointTgeoTgeoLogicalFunction.cpp) +add_plugin(EintersectsTgeoTgeo LogicalFunction nes-logical-operators EintersectsTgeoTgeoLogicalFunction.cpp) +add_plugin(EtouchesTgeoTgeo LogicalFunction nes-logical-operators EtouchesTgeoTgeoLogicalFunction.cpp) +add_plugin(EverEqTgeoTgeo LogicalFunction nes-logical-operators EverEqTgeoTgeoLogicalFunction.cpp) +add_plugin(EverNeTgeoTgeo LogicalFunction nes-logical-operators EverNeTgeoTgeoLogicalFunction.cpp) +add_plugin(AlwaysEqTgeoTgeo LogicalFunction nes-logical-operators AlwaysEqTgeoTgeoLogicalFunction.cpp) +add_plugin(AlwaysNeTgeoTgeo LogicalFunction nes-logical-operators AlwaysNeTgeoTgeoLogicalFunction.cpp) +add_plugin(NadTgeoTgeo LogicalFunction nes-logical-operators NadTgeoTgeoLogicalFunction.cpp) +add_plugin(EdwithinTgeoTgeo LogicalFunction nes-logical-operators EdwithinTgeoTgeoLogicalFunction.cpp) +add_plugin(AdwithinTgeoTgeo LogicalFunction nes-logical-operators AdwithinTgeoTgeoLogicalFunction.cpp) +add_plugin(AcontainsTcbufferGeo LogicalFunction nes-logical-operators AcontainsTcbufferGeoLogicalFunction.cpp) +add_plugin(AcoversTcbufferGeo LogicalFunction nes-logical-operators AcoversTcbufferGeoLogicalFunction.cpp) +add_plugin(AdisjointTcbufferGeo LogicalFunction nes-logical-operators AdisjointTcbufferGeoLogicalFunction.cpp) +add_plugin(AintersectsTcbufferGeo LogicalFunction nes-logical-operators AintersectsTcbufferGeoLogicalFunction.cpp) +add_plugin(AtouchesTcbufferGeo LogicalFunction nes-logical-operators AtouchesTcbufferGeoLogicalFunction.cpp) +add_plugin(EcontainsTcbufferGeo LogicalFunction nes-logical-operators EcontainsTcbufferGeoLogicalFunction.cpp) +add_plugin(EcoversTcbufferGeo LogicalFunction nes-logical-operators EcoversTcbufferGeoLogicalFunction.cpp) +add_plugin(EdisjointTcbufferGeo LogicalFunction nes-logical-operators EdisjointTcbufferGeoLogicalFunction.cpp) +add_plugin(EintersectsTcbufferGeo LogicalFunction nes-logical-operators EintersectsTcbufferGeoLogicalFunction.cpp) +add_plugin(EtouchesTcbufferGeo LogicalFunction nes-logical-operators EtouchesTcbufferGeoLogicalFunction.cpp) +add_plugin(NadTcbufferGeo LogicalFunction nes-logical-operators NadTcbufferGeoLogicalFunction.cpp) +add_plugin(EdwithinTcbufferGeo LogicalFunction nes-logical-operators EdwithinTcbufferGeoLogicalFunction.cpp) +add_plugin(AdwithinTcbufferGeo LogicalFunction nes-logical-operators AdwithinTcbufferGeoLogicalFunction.cpp) +add_plugin(AcontainsTcbufferTcbuffer LogicalFunction nes-logical-operators AcontainsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AcoversTcbufferTcbuffer LogicalFunction nes-logical-operators AcoversTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AdisjointTcbufferTcbuffer LogicalFunction nes-logical-operators AdisjointTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AintersectsTcbufferTcbuffer LogicalFunction nes-logical-operators AintersectsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AtouchesTcbufferTcbuffer LogicalFunction nes-logical-operators AtouchesTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EcontainsTcbufferTcbuffer LogicalFunction nes-logical-operators EcontainsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EcoversTcbufferTcbuffer LogicalFunction nes-logical-operators EcoversTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EdisjointTcbufferTcbuffer LogicalFunction nes-logical-operators EdisjointTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EintersectsTcbufferTcbuffer LogicalFunction nes-logical-operators EintersectsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EtouchesTcbufferTcbuffer LogicalFunction nes-logical-operators EtouchesTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EverEqTcbufferTcbuffer LogicalFunction nes-logical-operators EverEqTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EverNeTcbufferTcbuffer LogicalFunction nes-logical-operators EverNeTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AlwaysEqTcbufferTcbuffer LogicalFunction nes-logical-operators AlwaysEqTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AlwaysNeTcbufferTcbuffer LogicalFunction nes-logical-operators AlwaysNeTcbufferTcbufferLogicalFunction.cpp) +add_plugin(NadTcbufferTcbuffer LogicalFunction nes-logical-operators NadTcbufferTcbufferLogicalFunction.cpp) +add_plugin(EdwithinTcbufferTcbuffer LogicalFunction nes-logical-operators EdwithinTcbufferTcbufferLogicalFunction.cpp) +add_plugin(AdwithinTcbufferTcbuffer LogicalFunction nes-logical-operators AdwithinTcbufferTcbufferLogicalFunction.cpp) +add_plugin(MindistanceTcbufferTcbuffer LogicalFunction nes-logical-operators MindistanceTcbufferTcbufferLogicalFunction.cpp) +add_plugin(H3indexEq LogicalFunction nes-logical-operators H3indexEqLogicalFunction.cpp) +add_plugin(H3indexNe LogicalFunction nes-logical-operators H3indexNeLogicalFunction.cpp) +add_plugin(H3indexLt LogicalFunction nes-logical-operators H3indexLtLogicalFunction.cpp) +add_plugin(H3indexLe LogicalFunction nes-logical-operators H3indexLeLogicalFunction.cpp) +add_plugin(H3indexGt LogicalFunction nes-logical-operators H3indexGtLogicalFunction.cpp) +add_plugin(H3indexGe LogicalFunction nes-logical-operators H3indexGeLogicalFunction.cpp) +add_plugin(H3indexCmp LogicalFunction nes-logical-operators H3indexCmpLogicalFunction.cpp) +add_plugin(H3indexOut LogicalFunction nes-logical-operators H3indexOutLogicalFunction.cpp) +add_plugin(Th3indexGetResolution LogicalFunction nes-logical-operators Th3indexGetResolutionLogicalFunction.cpp) +add_plugin(Th3indexGetBaseCellNumber LogicalFunction nes-logical-operators Th3indexGetBaseCellNumberLogicalFunction.cpp) +add_plugin(Th3indexIsValidCell LogicalFunction nes-logical-operators Th3indexIsValidCellLogicalFunction.cpp) +add_plugin(Th3indexIsPentagon LogicalFunction nes-logical-operators Th3indexIsPentagonLogicalFunction.cpp) +add_plugin(Th3indexCellToParent LogicalFunction nes-logical-operators Th3indexCellToParentLogicalFunction.cpp) +add_plugin(Th3indexCellToParentNext LogicalFunction nes-logical-operators Th3indexCellToParentNextLogicalFunction.cpp) +add_plugin(Th3indexCellToCenterChild LogicalFunction nes-logical-operators Th3indexCellToCenterChildLogicalFunction.cpp) +add_plugin(Th3indexCellToCenterChildNext LogicalFunction nes-logical-operators Th3indexCellToCenterChildNextLogicalFunction.cpp) +add_plugin(Th3indexCellToChildPos LogicalFunction nes-logical-operators Th3indexCellToChildPosLogicalFunction.cpp) +add_plugin(Th3indexAreNeighborCells LogicalFunction nes-logical-operators Th3indexAreNeighborCellsLogicalFunction.cpp) +add_plugin(Th3indexGridDistance LogicalFunction nes-logical-operators Th3indexGridDistanceLogicalFunction.cpp) +add_plugin(EverEqTh3indexH3index LogicalFunction nes-logical-operators EverEqTh3indexH3indexLogicalFunction.cpp) +add_plugin(EverNeTh3indexH3index LogicalFunction nes-logical-operators EverNeTh3indexH3indexLogicalFunction.cpp) +add_plugin(AlwaysEqTh3indexH3index LogicalFunction nes-logical-operators AlwaysEqTh3indexH3indexLogicalFunction.cpp) +add_plugin(AlwaysNeTh3indexH3index LogicalFunction nes-logical-operators AlwaysNeTh3indexH3indexLogicalFunction.cpp) +add_plugin(QuadbinEq LogicalFunction nes-logical-operators QuadbinEqLogicalFunction.cpp) +add_plugin(QuadbinNe LogicalFunction nes-logical-operators QuadbinNeLogicalFunction.cpp) +add_plugin(QuadbinLt LogicalFunction nes-logical-operators QuadbinLtLogicalFunction.cpp) +add_plugin(QuadbinLe LogicalFunction nes-logical-operators QuadbinLeLogicalFunction.cpp) +add_plugin(QuadbinGt LogicalFunction nes-logical-operators QuadbinGtLogicalFunction.cpp) +add_plugin(QuadbinGe LogicalFunction nes-logical-operators QuadbinGeLogicalFunction.cpp) +add_plugin(QuadbinCmp LogicalFunction nes-logical-operators QuadbinCmpLogicalFunction.cpp) +add_plugin(QuadbinGetResolution LogicalFunction nes-logical-operators QuadbinGetResolutionLogicalFunction.cpp) +add_plugin(QuadbinIsValidCell LogicalFunction nes-logical-operators QuadbinIsValidCellLogicalFunction.cpp) +add_plugin(QuadbinCellArea LogicalFunction nes-logical-operators QuadbinCellAreaLogicalFunction.cpp) +add_plugin(QuadbinCellToParent LogicalFunction nes-logical-operators QuadbinCellToParentLogicalFunction.cpp) +add_plugin(QuadbinCellToQuadkey LogicalFunction nes-logical-operators QuadbinCellToQuadkeyLogicalFunction.cpp) +add_plugin(QuadbinPointToCell LogicalFunction nes-logical-operators QuadbinPointToCellLogicalFunction.cpp) +add_plugin(QuadbinTileToCell LogicalFunction nes-logical-operators QuadbinTileToCellLogicalFunction.cpp) +add_plugin(EverEqTquadbinQuadbin LogicalFunction nes-logical-operators EverEqTquadbinQuadbinLogicalFunction.cpp) +add_plugin(EverNeTquadbinQuadbin LogicalFunction nes-logical-operators EverNeTquadbinQuadbinLogicalFunction.cpp) +add_plugin(AlwaysEqTquadbinQuadbin LogicalFunction nes-logical-operators AlwaysEqTquadbinQuadbinLogicalFunction.cpp) +add_plugin(AlwaysNeTquadbinQuadbin LogicalFunction nes-logical-operators AlwaysNeTquadbinQuadbinLogicalFunction.cpp) +add_plugin(EverEqTtextText LogicalFunction nes-logical-operators EverEqTtextTextLogicalFunction.cpp) +add_plugin(EverEqTextTtext LogicalFunction nes-logical-operators EverEqTextTtextLogicalFunction.cpp) +add_plugin(EverNeTtextText LogicalFunction nes-logical-operators EverNeTtextTextLogicalFunction.cpp) +add_plugin(EverNeTextTtext LogicalFunction nes-logical-operators EverNeTextTtextLogicalFunction.cpp) +add_plugin(EverGeTtextText LogicalFunction nes-logical-operators EverGeTtextTextLogicalFunction.cpp) +add_plugin(EverGeTextTtext LogicalFunction nes-logical-operators EverGeTextTtextLogicalFunction.cpp) +add_plugin(EverGtTtextText LogicalFunction nes-logical-operators EverGtTtextTextLogicalFunction.cpp) +add_plugin(EverGtTextTtext LogicalFunction nes-logical-operators EverGtTextTtextLogicalFunction.cpp) +add_plugin(EverLeTtextText LogicalFunction nes-logical-operators EverLeTtextTextLogicalFunction.cpp) +add_plugin(EverLeTextTtext LogicalFunction nes-logical-operators EverLeTextTtextLogicalFunction.cpp) +add_plugin(EverLtTtextText LogicalFunction nes-logical-operators EverLtTtextTextLogicalFunction.cpp) +add_plugin(EverLtTextTtext LogicalFunction nes-logical-operators EverLtTextTtextLogicalFunction.cpp) +add_plugin(AlwaysEqTtextText LogicalFunction nes-logical-operators AlwaysEqTtextTextLogicalFunction.cpp) +add_plugin(AlwaysEqTextTtext LogicalFunction nes-logical-operators AlwaysEqTextTtextLogicalFunction.cpp) +add_plugin(AlwaysNeTtextText LogicalFunction nes-logical-operators AlwaysNeTtextTextLogicalFunction.cpp) +add_plugin(AlwaysNeTextTtext LogicalFunction nes-logical-operators AlwaysNeTextTtextLogicalFunction.cpp) +add_plugin(AlwaysGeTtextText LogicalFunction nes-logical-operators AlwaysGeTtextTextLogicalFunction.cpp) +add_plugin(AlwaysGeTextTtext LogicalFunction nes-logical-operators AlwaysGeTextTtextLogicalFunction.cpp) +add_plugin(AlwaysGtTtextText LogicalFunction nes-logical-operators AlwaysGtTtextTextLogicalFunction.cpp) +add_plugin(AlwaysGtTextTtext LogicalFunction nes-logical-operators AlwaysGtTextTtextLogicalFunction.cpp) +add_plugin(AlwaysLeTtextText LogicalFunction nes-logical-operators AlwaysLeTtextTextLogicalFunction.cpp) +add_plugin(AlwaysLeTextTtext LogicalFunction nes-logical-operators AlwaysLeTextTtextLogicalFunction.cpp) +add_plugin(AlwaysLtTtextText LogicalFunction nes-logical-operators AlwaysLtTtextTextLogicalFunction.cpp) +add_plugin(AlwaysLtTextTtext LogicalFunction nes-logical-operators AlwaysLtTextTtextLogicalFunction.cpp) +add_plugin(TEqTtextText LogicalFunction nes-logical-operators TEqTtextTextLogicalFunction.cpp) +add_plugin(TEqTextTtext LogicalFunction nes-logical-operators TEqTextTtextLogicalFunction.cpp) +add_plugin(TNeTtextText LogicalFunction nes-logical-operators TNeTtextTextLogicalFunction.cpp) +add_plugin(TNeTextTtext LogicalFunction nes-logical-operators TNeTextTtextLogicalFunction.cpp) +add_plugin(TtextUpper LogicalFunction nes-logical-operators TtextUpperLogicalFunction.cpp) +add_plugin(TtextLower LogicalFunction nes-logical-operators TtextLowerLogicalFunction.cpp) +add_plugin(TtextInitcap LogicalFunction nes-logical-operators TtextInitcapLogicalFunction.cpp) +add_plugin(TextUpper LogicalFunction nes-logical-operators TextUpperLogicalFunction.cpp) +add_plugin(TextLower LogicalFunction nes-logical-operators TextLowerLogicalFunction.cpp) +add_plugin(TextInitcap LogicalFunction nes-logical-operators TextInitcapLogicalFunction.cpp) +add_plugin(TextcatTtextText LogicalFunction nes-logical-operators TextcatTtextTextLogicalFunction.cpp) +add_plugin(TextcatTextTtext LogicalFunction nes-logical-operators TextcatTextTtextLogicalFunction.cpp) +add_plugin(TextcatTtextTtext LogicalFunction nes-logical-operators TextcatTtextTtextLogicalFunction.cpp) +add_plugin(TGeTtextText LogicalFunction nes-logical-operators TGeTtextTextLogicalFunction.cpp) +add_plugin(TGeTextTtext LogicalFunction nes-logical-operators TGeTextTtextLogicalFunction.cpp) +add_plugin(TGtTtextText LogicalFunction nes-logical-operators TGtTtextTextLogicalFunction.cpp) +add_plugin(TGtTextTtext LogicalFunction nes-logical-operators TGtTextTtextLogicalFunction.cpp) +add_plugin(TLeTtextText LogicalFunction nes-logical-operators TLeTtextTextLogicalFunction.cpp) +add_plugin(TLeTextTtext LogicalFunction nes-logical-operators TLeTextTtextLogicalFunction.cpp) +add_plugin(TLtTtextText LogicalFunction nes-logical-operators TLtTtextTextLogicalFunction.cpp) +add_plugin(TLtTextTtext LogicalFunction nes-logical-operators TLtTextTtextLogicalFunction.cpp) +add_plugin(JsonbEq LogicalFunction nes-logical-operators JsonbEqLogicalFunction.cpp) +add_plugin(JsonbNe LogicalFunction nes-logical-operators JsonbNeLogicalFunction.cpp) +add_plugin(JsonbLt LogicalFunction nes-logical-operators JsonbLtLogicalFunction.cpp) +add_plugin(JsonbLe LogicalFunction nes-logical-operators JsonbLeLogicalFunction.cpp) +add_plugin(JsonbGt LogicalFunction nes-logical-operators JsonbGtLogicalFunction.cpp) +add_plugin(JsonbGe LogicalFunction nes-logical-operators JsonbGeLogicalFunction.cpp) +add_plugin(JsonbCmp LogicalFunction nes-logical-operators JsonbCmpLogicalFunction.cpp) +add_plugin(JsonbContained LogicalFunction nes-logical-operators JsonbContainedLogicalFunction.cpp) +add_plugin(JsonbContains LogicalFunction nes-logical-operators JsonbContainsLogicalFunction.cpp) +add_plugin(JsonbExists LogicalFunction nes-logical-operators JsonbExistsLogicalFunction.cpp) +add_plugin(JsonbArrayLength LogicalFunction nes-logical-operators JsonbArrayLengthLogicalFunction.cpp) +add_plugin(JsonbToCstring LogicalFunction nes-logical-operators JsonbToCstringLogicalFunction.cpp) +add_plugin(JsonbPretty LogicalFunction nes-logical-operators JsonbPrettyLogicalFunction.cpp) +add_plugin(JsonbObjectFieldText LogicalFunction nes-logical-operators JsonbObjectFieldTextLogicalFunction.cpp) +add_plugin(JsonbArrayElementText LogicalFunction nes-logical-operators JsonbArrayElementTextLogicalFunction.cpp) +add_plugin(EverEqTjsonbJsonb LogicalFunction nes-logical-operators EverEqTjsonbJsonbLogicalFunction.cpp) +add_plugin(EverNeTjsonbJsonb LogicalFunction nes-logical-operators EverNeTjsonbJsonbLogicalFunction.cpp) +add_plugin(AlwaysEqTjsonbJsonb LogicalFunction nes-logical-operators AlwaysEqTjsonbJsonbLogicalFunction.cpp) +add_plugin(AlwaysNeTjsonbJsonb LogicalFunction nes-logical-operators AlwaysNeTjsonbJsonbLogicalFunction.cpp) +add_plugin(EverEqTjsonbTjsonb LogicalFunction nes-logical-operators EverEqTjsonbTjsonbLogicalFunction.cpp) +add_plugin(EverNeTjsonbTjsonb LogicalFunction nes-logical-operators EverNeTjsonbTjsonbLogicalFunction.cpp) +add_plugin(AlwaysEqTjsonbTjsonb LogicalFunction nes-logical-operators AlwaysEqTjsonbTjsonbLogicalFunction.cpp) +add_plugin(AlwaysNeTjsonbTjsonb LogicalFunction nes-logical-operators AlwaysNeTjsonbTjsonbLogicalFunction.cpp) +add_plugin(NadTnpointGeo LogicalFunction nes-logical-operators NadTnpointGeoLogicalFunction.cpp) +add_plugin(NadTnpointNpoint LogicalFunction nes-logical-operators NadTnpointNpointLogicalFunction.cpp) +add_plugin(NadTnpointTnpoint LogicalFunction nes-logical-operators NadTnpointTnpointLogicalFunction.cpp) +add_plugin(EverEqNpointTnpoint LogicalFunction nes-logical-operators EverEqNpointTnpointLogicalFunction.cpp) +add_plugin(EverEqTnpointNpoint LogicalFunction nes-logical-operators EverEqTnpointNpointLogicalFunction.cpp) +add_plugin(EverEqTnpointTnpoint LogicalFunction nes-logical-operators EverEqTnpointTnpointLogicalFunction.cpp) +add_plugin(EverNeNpointTnpoint LogicalFunction nes-logical-operators EverNeNpointTnpointLogicalFunction.cpp) +add_plugin(EverNeTnpointNpoint LogicalFunction nes-logical-operators EverNeTnpointNpointLogicalFunction.cpp) +add_plugin(EverNeTnpointTnpoint LogicalFunction nes-logical-operators EverNeTnpointTnpointLogicalFunction.cpp) +add_plugin(AlwaysEqNpointTnpoint LogicalFunction nes-logical-operators AlwaysEqNpointTnpointLogicalFunction.cpp) +add_plugin(AlwaysEqTnpointNpoint LogicalFunction nes-logical-operators AlwaysEqTnpointNpointLogicalFunction.cpp) +add_plugin(AlwaysEqTnpointTnpoint LogicalFunction nes-logical-operators AlwaysEqTnpointTnpointLogicalFunction.cpp) +add_plugin(AlwaysNeNpointTnpoint LogicalFunction nes-logical-operators AlwaysNeNpointTnpointLogicalFunction.cpp) +add_plugin(AlwaysNeTnpointNpoint LogicalFunction nes-logical-operators AlwaysNeTnpointNpointLogicalFunction.cpp) +add_plugin(AlwaysNeTnpointTnpoint LogicalFunction nes-logical-operators AlwaysNeTnpointTnpointLogicalFunction.cpp) +add_plugin(NadTposePose LogicalFunction nes-logical-operators NadTposePoseLogicalFunction.cpp) +add_plugin(NadTposeTpose LogicalFunction nes-logical-operators NadTposeTposeLogicalFunction.cpp) +add_plugin(NadTposeGeo LogicalFunction nes-logical-operators NadTposeGeoLogicalFunction.cpp) +add_plugin(EverEqPoseTpose LogicalFunction nes-logical-operators EverEqPoseTposeLogicalFunction.cpp) +add_plugin(EverEqTposePose LogicalFunction nes-logical-operators EverEqTposePoseLogicalFunction.cpp) +add_plugin(EverEqTposeTpose LogicalFunction nes-logical-operators EverEqTposeTposeLogicalFunction.cpp) +add_plugin(EverNePoseTpose LogicalFunction nes-logical-operators EverNePoseTposeLogicalFunction.cpp) +add_plugin(EverNeTposePose LogicalFunction nes-logical-operators EverNeTposePoseLogicalFunction.cpp) +add_plugin(EverNeTposeTpose LogicalFunction nes-logical-operators EverNeTposeTposeLogicalFunction.cpp) +add_plugin(AlwaysEqPoseTpose LogicalFunction nes-logical-operators AlwaysEqPoseTposeLogicalFunction.cpp) +add_plugin(AlwaysEqTposePose LogicalFunction nes-logical-operators AlwaysEqTposePoseLogicalFunction.cpp) +add_plugin(AlwaysEqTposeTpose LogicalFunction nes-logical-operators AlwaysEqTposeTposeLogicalFunction.cpp) +add_plugin(AlwaysNePoseTpose LogicalFunction nes-logical-operators AlwaysNePoseTposeLogicalFunction.cpp) +add_plugin(AlwaysNeTposePose LogicalFunction nes-logical-operators AlwaysNeTposePoseLogicalFunction.cpp) +add_plugin(AlwaysNeTposeTpose LogicalFunction nes-logical-operators AlwaysNeTposeTposeLogicalFunction.cpp) +add_plugin(GeomBoundary LogicalFunction nes-logical-operators GeomBoundaryLogicalFunction.cpp) +add_plugin(GeomCentroid LogicalFunction nes-logical-operators GeomCentroidLogicalFunction.cpp) +add_plugin(GeomConvexHull LogicalFunction nes-logical-operators GeomConvexHullLogicalFunction.cpp) +add_plugin(GeoReverse LogicalFunction nes-logical-operators GeoReverseLogicalFunction.cpp) +add_plugin(GeoPoints LogicalFunction nes-logical-operators GeoPointsLogicalFunction.cpp) +add_plugin(GeomUnaryUnion LogicalFunction nes-logical-operators GeomUnaryUnionLogicalFunction.cpp) +add_plugin(GeoSetSrid LogicalFunction nes-logical-operators GeoSetSridLogicalFunction.cpp) +add_plugin(GeoRound LogicalFunction nes-logical-operators GeoRoundLogicalFunction.cpp) +add_plugin(GeoTransform LogicalFunction nes-logical-operators GeoTransformLogicalFunction.cpp) +add_plugin(GeoSrid LogicalFunction nes-logical-operators GeoSridLogicalFunction.cpp) +add_plugin(GeoNumGeos LogicalFunction nes-logical-operators GeoNumGeosLogicalFunction.cpp) +add_plugin(GeoNumPoints LogicalFunction nes-logical-operators GeoNumPointsLogicalFunction.cpp) +add_plugin(GeomLength LogicalFunction nes-logical-operators GeomLengthLogicalFunction.cpp) +add_plugin(GeomPerimeter LogicalFunction nes-logical-operators GeomPerimeterLogicalFunction.cpp) +add_plugin(GeomIsEmpty LogicalFunction nes-logical-operators GeomIsEmptyLogicalFunction.cpp) +add_plugin(GeomAzimuth LogicalFunction nes-logical-operators GeomAzimuthLogicalFunction.cpp) +add_plugin(GeoIsUnitary LogicalFunction nes-logical-operators GeoIsUnitaryLogicalFunction.cpp) +add_plugin(GeoEquals LogicalFunction nes-logical-operators GeoEqualsLogicalFunction.cpp) +add_plugin(GeoSame LogicalFunction nes-logical-operators GeoSameLogicalFunction.cpp) +add_plugin(GeomIntersects LogicalFunction nes-logical-operators GeomIntersectsLogicalFunction.cpp) +add_plugin(GeomIntersects2d LogicalFunction nes-logical-operators GeomIntersects2dLogicalFunction.cpp) +add_plugin(GeomIntersects3d LogicalFunction nes-logical-operators GeomIntersects3dLogicalFunction.cpp) +add_plugin(GeomContains LogicalFunction nes-logical-operators GeomContainsLogicalFunction.cpp) +add_plugin(GeomCovers LogicalFunction nes-logical-operators GeomCoversLogicalFunction.cpp) +add_plugin(GeomDisjoint2d LogicalFunction nes-logical-operators GeomDisjoint2dLogicalFunction.cpp) +add_plugin(GeomTouches LogicalFunction nes-logical-operators GeomTouchesLogicalFunction.cpp) +add_plugin(GeogIntersects LogicalFunction nes-logical-operators GeogIntersectsLogicalFunction.cpp) +add_plugin(GeogDistance LogicalFunction nes-logical-operators GeogDistanceLogicalFunction.cpp) +add_plugin(LineLocatePoint LogicalFunction nes-logical-operators LineLocatePointLogicalFunction.cpp) +add_plugin(GeomDistance2d LogicalFunction nes-logical-operators GeomDistance2dLogicalFunction.cpp) +add_plugin(GeomDistance3d LogicalFunction nes-logical-operators GeomDistance3dLogicalFunction.cpp) +add_plugin(GeomDwithin2d LogicalFunction nes-logical-operators GeomDwithin2dLogicalFunction.cpp) +add_plugin(GeomDwithin3d LogicalFunction nes-logical-operators GeomDwithin3dLogicalFunction.cpp) +add_plugin(GeogDwithin LogicalFunction nes-logical-operators GeogDwithinLogicalFunction.cpp) +add_plugin(GeomDwithin LogicalFunction nes-logical-operators GeomDwithinLogicalFunction.cpp) +add_plugin(GeomIntersection2d LogicalFunction nes-logical-operators GeomIntersection2dLogicalFunction.cpp) +add_plugin(GeomIntersection2dColl LogicalFunction nes-logical-operators GeomIntersection2dCollLogicalFunction.cpp) +add_plugin(GeomDifference2d LogicalFunction nes-logical-operators GeomDifference2dLogicalFunction.cpp) +add_plugin(GeomShortestline2d LogicalFunction nes-logical-operators GeomShortestline2dLogicalFunction.cpp) +add_plugin(GeomShortestline3d LogicalFunction nes-logical-operators GeomShortestline3dLogicalFunction.cpp) +add_plugin(LineInterpolatePoint LogicalFunction nes-logical-operators LineInterpolatePointLogicalFunction.cpp) +add_plugin(LineSubstring LogicalFunction nes-logical-operators LineSubstringLogicalFunction.cpp) +add_plugin(LineNumpoints LogicalFunction nes-logical-operators LineNumpointsLogicalFunction.cpp) +add_plugin(LinePointN LogicalFunction nes-logical-operators LinePointNLogicalFunction.cpp) +add_plugin(GeoGeoN LogicalFunction nes-logical-operators GeoGeoNLogicalFunction.cpp) +add_plugin(GeoAsEwkt LogicalFunction nes-logical-operators GeoAsEwktLogicalFunction.cpp) +add_plugin(GeoAsGeojson LogicalFunction nes-logical-operators GeoAsGeojsonLogicalFunction.cpp) +add_plugin(GeomPointMake2d LogicalFunction nes-logical-operators GeomPointMake2dLogicalFunction.cpp) +add_plugin(GeomPointMake3dz LogicalFunction nes-logical-operators GeomPointMake3dzLogicalFunction.cpp) +add_plugin(GeogPointMake2d LogicalFunction nes-logical-operators GeogPointMake2dLogicalFunction.cpp) +add_plugin(GeogPointMake3dz LogicalFunction nes-logical-operators GeogPointMake3dzLogicalFunction.cpp) +add_plugin(GeogArea LogicalFunction nes-logical-operators GeogAreaLogicalFunction.cpp) +add_plugin(GeogLength LogicalFunction nes-logical-operators GeogLengthLogicalFunction.cpp) +add_plugin(GeogPerimeter LogicalFunction nes-logical-operators GeogPerimeterLogicalFunction.cpp) +add_plugin(GeogToGeom LogicalFunction nes-logical-operators GeogToGeomLogicalFunction.cpp) +add_plugin(GeomToGeog LogicalFunction nes-logical-operators GeomToGeogLogicalFunction.cpp) +add_plugin(GeogCentroid LogicalFunction nes-logical-operators GeogCentroidLogicalFunction.cpp) +add_plugin(IntspanLower LogicalFunction nes-logical-operators IntspanLowerLogicalFunction.cpp) +add_plugin(IntspanUpper LogicalFunction nes-logical-operators IntspanUpperLogicalFunction.cpp) +add_plugin(IntspanWidth LogicalFunction nes-logical-operators IntspanWidthLogicalFunction.cpp) +add_plugin(IntspanLowerInc LogicalFunction nes-logical-operators IntspanLowerIncLogicalFunction.cpp) +add_plugin(IntspanUpperInc LogicalFunction nes-logical-operators IntspanUpperIncLogicalFunction.cpp) +add_plugin(FloatspanLower LogicalFunction nes-logical-operators FloatspanLowerLogicalFunction.cpp) +add_plugin(FloatspanUpper LogicalFunction nes-logical-operators FloatspanUpperLogicalFunction.cpp) +add_plugin(FloatspanWidth LogicalFunction nes-logical-operators FloatspanWidthLogicalFunction.cpp) +add_plugin(FloatspanLowerInc LogicalFunction nes-logical-operators FloatspanLowerIncLogicalFunction.cpp) +add_plugin(FloatspanUpperInc LogicalFunction nes-logical-operators FloatspanUpperIncLogicalFunction.cpp) +add_plugin(ContainedIntSpan LogicalFunction nes-logical-operators ContainedIntSpanLogicalFunction.cpp) +add_plugin(ContainedFloatSpan LogicalFunction nes-logical-operators ContainedFloatSpanLogicalFunction.cpp) +add_plugin(ContainedSpanSpan LogicalFunction nes-logical-operators ContainedSpanSpanLogicalFunction.cpp) +add_plugin(ContainedFloatspanSpan LogicalFunction nes-logical-operators ContainedFloatspanSpanLogicalFunction.cpp) +add_plugin(ContainsSpanInt LogicalFunction nes-logical-operators ContainsSpanIntLogicalFunction.cpp) +add_plugin(ContainsSpanFloat LogicalFunction nes-logical-operators ContainsSpanFloatLogicalFunction.cpp) +add_plugin(ContainsSpanSpan LogicalFunction nes-logical-operators ContainsSpanSpanLogicalFunction.cpp) +add_plugin(ContainsFloatspanSpan LogicalFunction nes-logical-operators ContainsFloatspanSpanLogicalFunction.cpp) +add_plugin(AcontainsGeoTrgeometry LogicalFunction nes-logical-operators AcontainsGeoTrgeometryLogicalFunction.cpp) +add_plugin(AcoversGeoTrgeometry LogicalFunction nes-logical-operators AcoversGeoTrgeometryLogicalFunction.cpp) +add_plugin(AcoversTrgeometryGeo LogicalFunction nes-logical-operators AcoversTrgeometryGeoLogicalFunction.cpp) +add_plugin(AdisjointTrgeometryGeo LogicalFunction nes-logical-operators AdisjointTrgeometryGeoLogicalFunction.cpp) +add_plugin(AdisjointTrgeometryTrgeometry LogicalFunction nes-logical-operators AdisjointTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(AdwithinTrgeometryGeo LogicalFunction nes-logical-operators AdwithinTrgeometryGeoLogicalFunction.cpp) +add_plugin(AdwithinTrgeometryTrgeometry LogicalFunction nes-logical-operators AdwithinTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(AintersectsTrgeometryGeo LogicalFunction nes-logical-operators AintersectsTrgeometryGeoLogicalFunction.cpp) +add_plugin(AintersectsTrgeometryTrgeometry LogicalFunction nes-logical-operators AintersectsTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(AlwaysEqGeoTrgeometry LogicalFunction nes-logical-operators AlwaysEqGeoTrgeometryLogicalFunction.cpp) +add_plugin(AlwaysEqTrgeometryGeo LogicalFunction nes-logical-operators AlwaysEqTrgeometryGeoLogicalFunction.cpp) +add_plugin(AlwaysEqTrgeometryTrgeometry LogicalFunction nes-logical-operators AlwaysEqTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(AlwaysNeGeoTrgeometry LogicalFunction nes-logical-operators AlwaysNeGeoTrgeometryLogicalFunction.cpp) +add_plugin(AlwaysNeTrgeometryGeo LogicalFunction nes-logical-operators AlwaysNeTrgeometryGeoLogicalFunction.cpp) +add_plugin(AlwaysNeTrgeometryTrgeometry LogicalFunction nes-logical-operators AlwaysNeTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(AtouchesTrgeometryGeo LogicalFunction nes-logical-operators AtouchesTrgeometryGeoLogicalFunction.cpp) +add_plugin(EcontainsGeoTrgeometry LogicalFunction nes-logical-operators EcontainsGeoTrgeometryLogicalFunction.cpp) +add_plugin(EcoversGeoTrgeometry LogicalFunction nes-logical-operators EcoversGeoTrgeometryLogicalFunction.cpp) +add_plugin(EcoversTrgeometryGeo LogicalFunction nes-logical-operators EcoversTrgeometryGeoLogicalFunction.cpp) +add_plugin(EdisjointTrgeometryGeo LogicalFunction nes-logical-operators EdisjointTrgeometryGeoLogicalFunction.cpp) +add_plugin(EdisjointTrgeometryTrgeometry LogicalFunction nes-logical-operators EdisjointTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(EdwithinTrgeometryGeo LogicalFunction nes-logical-operators EdwithinTrgeometryGeoLogicalFunction.cpp) +add_plugin(EdwithinTrgeometryTrgeometry LogicalFunction nes-logical-operators EdwithinTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(EintersectsTrgeometryGeo LogicalFunction nes-logical-operators EintersectsTrgeometryGeoLogicalFunction.cpp) +add_plugin(EintersectsTrgeometryTrgeometry LogicalFunction nes-logical-operators EintersectsTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(EtouchesTrgeometryGeo LogicalFunction nes-logical-operators EtouchesTrgeometryGeoLogicalFunction.cpp) +add_plugin(EverEqGeoTrgeometry LogicalFunction nes-logical-operators EverEqGeoTrgeometryLogicalFunction.cpp) +add_plugin(EverEqTrgeometryGeo LogicalFunction nes-logical-operators EverEqTrgeometryGeoLogicalFunction.cpp) +add_plugin(EverEqTrgeometryTrgeometry LogicalFunction nes-logical-operators EverEqTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(EverNeGeoTrgeometry LogicalFunction nes-logical-operators EverNeGeoTrgeometryLogicalFunction.cpp) +add_plugin(EverNeTrgeometryGeo LogicalFunction nes-logical-operators EverNeTrgeometryGeoLogicalFunction.cpp) +add_plugin(EverNeTrgeometryTrgeometry LogicalFunction nes-logical-operators EverNeTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(NadTrgeometryGeo LogicalFunction nes-logical-operators NadTrgeometryGeoLogicalFunction.cpp) +add_plugin(NadTrgeometryTrgeometry LogicalFunction nes-logical-operators NadTrgeometryTrgeometryLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTPoseGeometry LogicalFunction nes-logical-operators TemporalEIntersectsTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTPoseGeometry LogicalFunction nes-logical-operators TemporalAIntersectsTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalECoversTPoseGeometry LogicalFunction nes-logical-operators TemporalECoversTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalEDisjointTPoseGeometry LogicalFunction nes-logical-operators TemporalEDisjointTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalADisjointTPoseGeometry LogicalFunction nes-logical-operators TemporalADisjointTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalETouchesTPoseGeometry LogicalFunction nes-logical-operators TemporalETouchesTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalATouchesTPoseGeometry LogicalFunction nes-logical-operators TemporalATouchesTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalEContainsTPoseGeometry LogicalFunction nes-logical-operators TemporalEContainsTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalAContainsTPoseGeometry LogicalFunction nes-logical-operators TemporalAContainsTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalEDWithinTPoseGeometry LogicalFunction nes-logical-operators TemporalEDWithinTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalADWithinTPoseGeometry LogicalFunction nes-logical-operators TemporalADWithinTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTPoseTPose LogicalFunction nes-logical-operators TemporalEIntersectsTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTPoseTPose LogicalFunction nes-logical-operators TemporalAIntersectsTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalECoversTPoseTPose LogicalFunction nes-logical-operators TemporalECoversTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalEDisjointTPoseTPose LogicalFunction nes-logical-operators TemporalEDisjointTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalADisjointTPoseTPose LogicalFunction nes-logical-operators TemporalADisjointTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalETouchesTPoseTPose LogicalFunction nes-logical-operators TemporalETouchesTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalATouchesTPoseTPose LogicalFunction nes-logical-operators TemporalATouchesTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalEContainsTPoseTPose LogicalFunction nes-logical-operators TemporalEContainsTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalAContainsTPoseTPose LogicalFunction nes-logical-operators TemporalAContainsTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalEDWithinTPoseTPose LogicalFunction nes-logical-operators TemporalEDWithinTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalADWithinTPoseTPose LogicalFunction nes-logical-operators TemporalADWithinTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalNADTPoseGeometry LogicalFunction nes-logical-operators TemporalNADTPoseGeometryLogicalFunction.cpp) +add_plugin(TemporalNADTPoseTPose LogicalFunction nes-logical-operators TemporalNADTPoseTPoseLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTNpointGeometry LogicalFunction nes-logical-operators TemporalEIntersectsTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTNpointGeometry LogicalFunction nes-logical-operators TemporalAIntersectsTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalECoversTNpointGeometry LogicalFunction nes-logical-operators TemporalECoversTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalEDisjointTNpointGeometry LogicalFunction nes-logical-operators TemporalEDisjointTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalADisjointTNpointGeometry LogicalFunction nes-logical-operators TemporalADisjointTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalETouchesTNpointGeometry LogicalFunction nes-logical-operators TemporalETouchesTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalATouchesTNpointGeometry LogicalFunction nes-logical-operators TemporalATouchesTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalEContainsTNpointGeometry LogicalFunction nes-logical-operators TemporalEContainsTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalAContainsTNpointGeometry LogicalFunction nes-logical-operators TemporalAContainsTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalEDWithinTNpointGeometry LogicalFunction nes-logical-operators TemporalEDWithinTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalADWithinTNpointGeometry LogicalFunction nes-logical-operators TemporalADWithinTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTNpointTNpoint LogicalFunction nes-logical-operators TemporalEIntersectsTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTNpointTNpoint LogicalFunction nes-logical-operators TemporalAIntersectsTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalECoversTNpointTNpoint LogicalFunction nes-logical-operators TemporalECoversTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalEDisjointTNpointTNpoint LogicalFunction nes-logical-operators TemporalEDisjointTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalADisjointTNpointTNpoint LogicalFunction nes-logical-operators TemporalADisjointTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalETouchesTNpointTNpoint LogicalFunction nes-logical-operators TemporalETouchesTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalATouchesTNpointTNpoint LogicalFunction nes-logical-operators TemporalATouchesTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalEContainsTNpointTNpoint LogicalFunction nes-logical-operators TemporalEContainsTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalAContainsTNpointTNpoint LogicalFunction nes-logical-operators TemporalAContainsTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalEDWithinTNpointTNpoint LogicalFunction nes-logical-operators TemporalEDWithinTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalADWithinTNpointTNpoint LogicalFunction nes-logical-operators TemporalADWithinTNpointTNpointLogicalFunction.cpp) +add_plugin(TemporalNADTNpointGeometry LogicalFunction nes-logical-operators TemporalNADTNpointGeometryLogicalFunction.cpp) +add_plugin(TemporalNADTNpointTNpoint LogicalFunction nes-logical-operators TemporalNADTNpointTNpointLogicalFunction.cpp) +add_plugin(AboveStboxStbox LogicalFunction nes-logical-operators AboveStboxStboxLogicalFunction.cpp) +add_plugin(AdjacentStboxStbox LogicalFunction nes-logical-operators AdjacentStboxStboxLogicalFunction.cpp) +add_plugin(AfterStboxStbox LogicalFunction nes-logical-operators AfterStboxStboxLogicalFunction.cpp) +add_plugin(BackStboxStbox LogicalFunction nes-logical-operators BackStboxStboxLogicalFunction.cpp) +add_plugin(BeforeStboxStbox LogicalFunction nes-logical-operators BeforeStboxStboxLogicalFunction.cpp) +add_plugin(BelowStboxStbox LogicalFunction nes-logical-operators BelowStboxStboxLogicalFunction.cpp) +add_plugin(ContainedStboxStbox LogicalFunction nes-logical-operators ContainedStboxStboxLogicalFunction.cpp) +add_plugin(ContainsStboxStbox LogicalFunction nes-logical-operators ContainsStboxStboxLogicalFunction.cpp) +add_plugin(FrontStboxStbox LogicalFunction nes-logical-operators FrontStboxStboxLogicalFunction.cpp) +add_plugin(LeftStboxStbox LogicalFunction nes-logical-operators LeftStboxStboxLogicalFunction.cpp) +add_plugin(OveraboveStboxStbox LogicalFunction nes-logical-operators OveraboveStboxStboxLogicalFunction.cpp) +add_plugin(OverafterStboxStbox LogicalFunction nes-logical-operators OverafterStboxStboxLogicalFunction.cpp) +add_plugin(OverbackStboxStbox LogicalFunction nes-logical-operators OverbackStboxStboxLogicalFunction.cpp) +add_plugin(OverbeforeStboxStbox LogicalFunction nes-logical-operators OverbeforeStboxStboxLogicalFunction.cpp) +add_plugin(OverbelowStboxStbox LogicalFunction nes-logical-operators OverbelowStboxStboxLogicalFunction.cpp) +add_plugin(OverfrontStboxStbox LogicalFunction nes-logical-operators OverfrontStboxStboxLogicalFunction.cpp) +add_plugin(OverlapsStboxStbox LogicalFunction nes-logical-operators OverlapsStboxStboxLogicalFunction.cpp) +add_plugin(OverleftStboxStbox LogicalFunction nes-logical-operators OverleftStboxStboxLogicalFunction.cpp) +add_plugin(OverrightStboxStbox LogicalFunction nes-logical-operators OverrightStboxStboxLogicalFunction.cpp) +add_plugin(RightStboxStbox LogicalFunction nes-logical-operators RightStboxStboxLogicalFunction.cpp) +add_plugin(SameStboxStbox LogicalFunction nes-logical-operators SameStboxStboxLogicalFunction.cpp) +add_plugin(StboxEq LogicalFunction nes-logical-operators StboxEqLogicalFunction.cpp) +add_plugin(StboxGe LogicalFunction nes-logical-operators StboxGeLogicalFunction.cpp) +add_plugin(StboxGt LogicalFunction nes-logical-operators StboxGtLogicalFunction.cpp) +add_plugin(StboxLe LogicalFunction nes-logical-operators StboxLeLogicalFunction.cpp) +add_plugin(StboxLt LogicalFunction nes-logical-operators StboxLtLogicalFunction.cpp) +add_plugin(StboxNe LogicalFunction nes-logical-operators StboxNeLogicalFunction.cpp) +add_plugin(NadStboxStbox LogicalFunction nes-logical-operators NadStboxStboxLogicalFunction.cpp) +add_plugin(StboxCmp LogicalFunction nes-logical-operators StboxCmpLogicalFunction.cpp) +add_plugin(AboveStboxTspatial LogicalFunction nes-logical-operators AboveStboxTspatialLogicalFunction.cpp) +add_plugin(AdjacentStboxTspatial LogicalFunction nes-logical-operators AdjacentStboxTspatialLogicalFunction.cpp) +add_plugin(AfterStboxTspatial LogicalFunction nes-logical-operators AfterStboxTspatialLogicalFunction.cpp) +add_plugin(BackStboxTspatial LogicalFunction nes-logical-operators BackStboxTspatialLogicalFunction.cpp) +add_plugin(BeforeStboxTspatial LogicalFunction nes-logical-operators BeforeStboxTspatialLogicalFunction.cpp) +add_plugin(BelowStboxTspatial LogicalFunction nes-logical-operators BelowStboxTspatialLogicalFunction.cpp) +add_plugin(ContainedStboxTspatial LogicalFunction nes-logical-operators ContainedStboxTspatialLogicalFunction.cpp) +add_plugin(ContainsStboxTspatial LogicalFunction nes-logical-operators ContainsStboxTspatialLogicalFunction.cpp) +add_plugin(FrontStboxTspatial LogicalFunction nes-logical-operators FrontStboxTspatialLogicalFunction.cpp) +add_plugin(LeftStboxTspatial LogicalFunction nes-logical-operators LeftStboxTspatialLogicalFunction.cpp) +add_plugin(OveraboveStboxTspatial LogicalFunction nes-logical-operators OveraboveStboxTspatialLogicalFunction.cpp) +add_plugin(OverafterStboxTspatial LogicalFunction nes-logical-operators OverafterStboxTspatialLogicalFunction.cpp) +add_plugin(OverbackStboxTspatial LogicalFunction nes-logical-operators OverbackStboxTspatialLogicalFunction.cpp) +add_plugin(OverbeforeStboxTspatial LogicalFunction nes-logical-operators OverbeforeStboxTspatialLogicalFunction.cpp) +add_plugin(OverbelowStboxTspatial LogicalFunction nes-logical-operators OverbelowStboxTspatialLogicalFunction.cpp) +add_plugin(OverfrontStboxTspatial LogicalFunction nes-logical-operators OverfrontStboxTspatialLogicalFunction.cpp) +add_plugin(OverlapsStboxTspatial LogicalFunction nes-logical-operators OverlapsStboxTspatialLogicalFunction.cpp) +add_plugin(OverleftStboxTspatial LogicalFunction nes-logical-operators OverleftStboxTspatialLogicalFunction.cpp) +add_plugin(OverrightStboxTspatial LogicalFunction nes-logical-operators OverrightStboxTspatialLogicalFunction.cpp) +add_plugin(RightStboxTspatial LogicalFunction nes-logical-operators RightStboxTspatialLogicalFunction.cpp) +add_plugin(SameStboxTspatial LogicalFunction nes-logical-operators SameStboxTspatialLogicalFunction.cpp) +add_plugin(AboveTspatialStbox LogicalFunction nes-logical-operators AboveTspatialStboxLogicalFunction.cpp) +add_plugin(AdjacentTspatialStbox LogicalFunction nes-logical-operators AdjacentTspatialStboxLogicalFunction.cpp) +add_plugin(AfterTspatialStbox LogicalFunction nes-logical-operators AfterTspatialStboxLogicalFunction.cpp) +add_plugin(BackTspatialStbox LogicalFunction nes-logical-operators BackTspatialStboxLogicalFunction.cpp) +add_plugin(BeforeTspatialStbox LogicalFunction nes-logical-operators BeforeTspatialStboxLogicalFunction.cpp) +add_plugin(BelowTspatialStbox LogicalFunction nes-logical-operators BelowTspatialStboxLogicalFunction.cpp) +add_plugin(ContainedTspatialStbox LogicalFunction nes-logical-operators ContainedTspatialStboxLogicalFunction.cpp) +add_plugin(ContainsTspatialStbox LogicalFunction nes-logical-operators ContainsTspatialStboxLogicalFunction.cpp) +add_plugin(FrontTspatialStbox LogicalFunction nes-logical-operators FrontTspatialStboxLogicalFunction.cpp) +add_plugin(LeftTspatialStbox LogicalFunction nes-logical-operators LeftTspatialStboxLogicalFunction.cpp) +add_plugin(OveraboveTspatialStbox LogicalFunction nes-logical-operators OveraboveTspatialStboxLogicalFunction.cpp) +add_plugin(OverafterTspatialStbox LogicalFunction nes-logical-operators OverafterTspatialStboxLogicalFunction.cpp) +add_plugin(OverbackTspatialStbox LogicalFunction nes-logical-operators OverbackTspatialStboxLogicalFunction.cpp) +add_plugin(OverbeforeTspatialStbox LogicalFunction nes-logical-operators OverbeforeTspatialStboxLogicalFunction.cpp) +add_plugin(OverbelowTspatialStbox LogicalFunction nes-logical-operators OverbelowTspatialStboxLogicalFunction.cpp) +add_plugin(OverfrontTspatialStbox LogicalFunction nes-logical-operators OverfrontTspatialStboxLogicalFunction.cpp) +add_plugin(OverlapsTspatialStbox LogicalFunction nes-logical-operators OverlapsTspatialStboxLogicalFunction.cpp) +add_plugin(OverleftTspatialStbox LogicalFunction nes-logical-operators OverleftTspatialStboxLogicalFunction.cpp) +add_plugin(OverrightTspatialStbox LogicalFunction nes-logical-operators OverrightTspatialStboxLogicalFunction.cpp) +add_plugin(RightTspatialStbox LogicalFunction nes-logical-operators RightTspatialStboxLogicalFunction.cpp) +add_plugin(SameTspatialStbox LogicalFunction nes-logical-operators SameTspatialStboxLogicalFunction.cpp) +add_plugin(NadTgeoStbox LogicalFunction nes-logical-operators NadTgeoStboxLogicalFunction.cpp) +add_plugin(AdjacentTboxTnumber LogicalFunction nes-logical-operators AdjacentTboxTnumberLogicalFunction.cpp) +add_plugin(AfterTboxTnumber LogicalFunction nes-logical-operators AfterTboxTnumberLogicalFunction.cpp) +add_plugin(BeforeTboxTnumber LogicalFunction nes-logical-operators BeforeTboxTnumberLogicalFunction.cpp) +add_plugin(ContainedTboxTnumber LogicalFunction nes-logical-operators ContainedTboxTnumberLogicalFunction.cpp) +add_plugin(ContainsTboxTnumber LogicalFunction nes-logical-operators ContainsTboxTnumberLogicalFunction.cpp) +add_plugin(LeftTboxTnumber LogicalFunction nes-logical-operators LeftTboxTnumberLogicalFunction.cpp) +add_plugin(OverafterTboxTnumber LogicalFunction nes-logical-operators OverafterTboxTnumberLogicalFunction.cpp) +add_plugin(OverbeforeTboxTnumber LogicalFunction nes-logical-operators OverbeforeTboxTnumberLogicalFunction.cpp) +add_plugin(OverlapsTboxTnumber LogicalFunction nes-logical-operators OverlapsTboxTnumberLogicalFunction.cpp) +add_plugin(OverleftTboxTnumber LogicalFunction nes-logical-operators OverleftTboxTnumberLogicalFunction.cpp) +add_plugin(OverrightTboxTnumber LogicalFunction nes-logical-operators OverrightTboxTnumberLogicalFunction.cpp) +add_plugin(RightTboxTnumber LogicalFunction nes-logical-operators RightTboxTnumberLogicalFunction.cpp) +add_plugin(SameTboxTnumber LogicalFunction nes-logical-operators SameTboxTnumberLogicalFunction.cpp) +add_plugin(AdjacentTnumberTbox LogicalFunction nes-logical-operators AdjacentTnumberTboxLogicalFunction.cpp) +add_plugin(AfterTnumberTbox LogicalFunction nes-logical-operators AfterTnumberTboxLogicalFunction.cpp) +add_plugin(BeforeTnumberTbox LogicalFunction nes-logical-operators BeforeTnumberTboxLogicalFunction.cpp) +add_plugin(ContainedTnumberTbox LogicalFunction nes-logical-operators ContainedTnumberTboxLogicalFunction.cpp) +add_plugin(ContainsTnumberTbox LogicalFunction nes-logical-operators ContainsTnumberTboxLogicalFunction.cpp) +add_plugin(LeftTnumberTbox LogicalFunction nes-logical-operators LeftTnumberTboxLogicalFunction.cpp) +add_plugin(OverafterTnumberTbox LogicalFunction nes-logical-operators OverafterTnumberTboxLogicalFunction.cpp) +add_plugin(OverbeforeTnumberTbox LogicalFunction nes-logical-operators OverbeforeTnumberTboxLogicalFunction.cpp) +add_plugin(OverlapsTnumberTbox LogicalFunction nes-logical-operators OverlapsTnumberTboxLogicalFunction.cpp) +add_plugin(OverleftTnumberTbox LogicalFunction nes-logical-operators OverleftTnumberTboxLogicalFunction.cpp) +add_plugin(OverrightTnumberTbox LogicalFunction nes-logical-operators OverrightTnumberTboxLogicalFunction.cpp) +add_plugin(RightTnumberTbox LogicalFunction nes-logical-operators RightTnumberTboxLogicalFunction.cpp) +add_plugin(SameTnumberTbox LogicalFunction nes-logical-operators SameTnumberTboxLogicalFunction.cpp) +add_plugin(NadTfloatTbox LogicalFunction nes-logical-operators NadTfloatTboxLogicalFunction.cpp) +add_plugin(NadTintTbox LogicalFunction nes-logical-operators NadTintTboxLogicalFunction.cpp) +add_plugin(AdjacentTnumberTnumber LogicalFunction nes-logical-operators AdjacentTnumberTnumberLogicalFunction.cpp) +add_plugin(AfterTnumberTnumber LogicalFunction nes-logical-operators AfterTnumberTnumberLogicalFunction.cpp) +add_plugin(BeforeTnumberTnumber LogicalFunction nes-logical-operators BeforeTnumberTnumberLogicalFunction.cpp) +add_plugin(ContainedTnumberTnumber LogicalFunction nes-logical-operators ContainedTnumberTnumberLogicalFunction.cpp) +add_plugin(ContainsTnumberTnumber LogicalFunction nes-logical-operators ContainsTnumberTnumberLogicalFunction.cpp) +add_plugin(LeftTnumberTnumber LogicalFunction nes-logical-operators LeftTnumberTnumberLogicalFunction.cpp) +add_plugin(OverafterTnumberTnumber LogicalFunction nes-logical-operators OverafterTnumberTnumberLogicalFunction.cpp) +add_plugin(OverbeforeTnumberTnumber LogicalFunction nes-logical-operators OverbeforeTnumberTnumberLogicalFunction.cpp) +add_plugin(OverlapsTnumberTnumber LogicalFunction nes-logical-operators OverlapsTnumberTnumberLogicalFunction.cpp) +add_plugin(OverleftTnumberTnumber LogicalFunction nes-logical-operators OverleftTnumberTnumberLogicalFunction.cpp) +add_plugin(OverrightTnumberTnumber LogicalFunction nes-logical-operators OverrightTnumberTnumberLogicalFunction.cpp) +add_plugin(RightTnumberTnumber LogicalFunction nes-logical-operators RightTnumberTnumberLogicalFunction.cpp) +add_plugin(SameTnumberTnumber LogicalFunction nes-logical-operators SameTnumberTnumberLogicalFunction.cpp) +add_plugin(TboolEndValue LogicalFunction nes-logical-operators TboolEndValueLogicalFunction.cpp) +add_plugin(TboolStartValue LogicalFunction nes-logical-operators TboolStartValueLogicalFunction.cpp) +add_plugin(AboveTspatialTspatial LogicalFunction nes-logical-operators AboveTspatialTspatialLogicalFunction.cpp) +add_plugin(AdjacentTspatialTspatial LogicalFunction nes-logical-operators AdjacentTspatialTspatialLogicalFunction.cpp) +add_plugin(AfterTspatialTspatial LogicalFunction nes-logical-operators AfterTspatialTspatialLogicalFunction.cpp) +add_plugin(BackTspatialTspatial LogicalFunction nes-logical-operators BackTspatialTspatialLogicalFunction.cpp) +add_plugin(BeforeTspatialTspatial LogicalFunction nes-logical-operators BeforeTspatialTspatialLogicalFunction.cpp) +add_plugin(BelowTspatialTspatial LogicalFunction nes-logical-operators BelowTspatialTspatialLogicalFunction.cpp) +add_plugin(ContainedTspatialTspatial LogicalFunction nes-logical-operators ContainedTspatialTspatialLogicalFunction.cpp) +add_plugin(ContainsTspatialTspatial LogicalFunction nes-logical-operators ContainsTspatialTspatialLogicalFunction.cpp) +add_plugin(FrontTspatialTspatial LogicalFunction nes-logical-operators FrontTspatialTspatialLogicalFunction.cpp) +add_plugin(LeftTspatialTspatial LogicalFunction nes-logical-operators LeftTspatialTspatialLogicalFunction.cpp) +add_plugin(OveraboveTspatialTspatial LogicalFunction nes-logical-operators OveraboveTspatialTspatialLogicalFunction.cpp) +add_plugin(OverafterTspatialTspatial LogicalFunction nes-logical-operators OverafterTspatialTspatialLogicalFunction.cpp) +add_plugin(OverbackTspatialTspatial LogicalFunction nes-logical-operators OverbackTspatialTspatialLogicalFunction.cpp) +add_plugin(OverbeforeTspatialTspatial LogicalFunction nes-logical-operators OverbeforeTspatialTspatialLogicalFunction.cpp) +add_plugin(OverbelowTspatialTspatial LogicalFunction nes-logical-operators OverbelowTspatialTspatialLogicalFunction.cpp) +add_plugin(OverfrontTspatialTspatial LogicalFunction nes-logical-operators OverfrontTspatialTspatialLogicalFunction.cpp) +add_plugin(OverlapsTspatialTspatial LogicalFunction nes-logical-operators OverlapsTspatialTspatialLogicalFunction.cpp) +add_plugin(OverleftTspatialTspatial LogicalFunction nes-logical-operators OverleftTspatialTspatialLogicalFunction.cpp) +add_plugin(OverrightTspatialTspatial LogicalFunction nes-logical-operators OverrightTspatialTspatialLogicalFunction.cpp) +add_plugin(RightTspatialTspatial LogicalFunction nes-logical-operators RightTspatialTspatialLogicalFunction.cpp) +add_plugin(SameTspatialTspatial LogicalFunction nes-logical-operators SameTspatialTspatialLogicalFunction.cpp) +add_plugin(AdjacentTemporalTemporal LogicalFunction nes-logical-operators AdjacentTemporalTemporalLogicalFunction.cpp) +add_plugin(AfterTemporalTemporal LogicalFunction nes-logical-operators AfterTemporalTemporalLogicalFunction.cpp) +add_plugin(BeforeTemporalTemporal LogicalFunction nes-logical-operators BeforeTemporalTemporalLogicalFunction.cpp) +add_plugin(ContainedTemporalTemporal LogicalFunction nes-logical-operators ContainedTemporalTemporalLogicalFunction.cpp) +add_plugin(ContainsTemporalTemporal LogicalFunction nes-logical-operators ContainsTemporalTemporalLogicalFunction.cpp) +add_plugin(OverafterTemporalTemporal LogicalFunction nes-logical-operators OverafterTemporalTemporalLogicalFunction.cpp) +add_plugin(OverbeforeTemporalTemporal LogicalFunction nes-logical-operators OverbeforeTemporalTemporalLogicalFunction.cpp) +add_plugin(OverlapsTemporalTemporal LogicalFunction nes-logical-operators OverlapsTemporalTemporalLogicalFunction.cpp) +add_plugin(SameTemporalTemporal LogicalFunction nes-logical-operators SameTemporalTemporalLogicalFunction.cpp) +add_plugin(TemporalCmp LogicalFunction nes-logical-operators TemporalCmpLogicalFunction.cpp) +add_plugin(TemporalEq LogicalFunction nes-logical-operators TemporalEqLogicalFunction.cpp) +add_plugin(TemporalGe LogicalFunction nes-logical-operators TemporalGeLogicalFunction.cpp) +add_plugin(TemporalGt LogicalFunction nes-logical-operators TemporalGtLogicalFunction.cpp) +add_plugin(TemporalLe LogicalFunction nes-logical-operators TemporalLeLogicalFunction.cpp) +add_plugin(TemporalLt LogicalFunction nes-logical-operators TemporalLtLogicalFunction.cpp) +add_plugin(TemporalNe LogicalFunction nes-logical-operators TemporalNeLogicalFunction.cpp) +add_plugin(AlwaysEqTemporalTemporal LogicalFunction nes-logical-operators AlwaysEqTemporalTemporalLogicalFunction.cpp) +add_plugin(AlwaysGeTemporalTemporal LogicalFunction nes-logical-operators AlwaysGeTemporalTemporalLogicalFunction.cpp) +add_plugin(AlwaysGtTemporalTemporal LogicalFunction nes-logical-operators AlwaysGtTemporalTemporalLogicalFunction.cpp) +add_plugin(AlwaysLeTemporalTemporal LogicalFunction nes-logical-operators AlwaysLeTemporalTemporalLogicalFunction.cpp) +add_plugin(AlwaysLtTemporalTemporal LogicalFunction nes-logical-operators AlwaysLtTemporalTemporalLogicalFunction.cpp) +add_plugin(AlwaysNeTemporalTemporal LogicalFunction nes-logical-operators AlwaysNeTemporalTemporalLogicalFunction.cpp) +add_plugin(EverEqTemporalTemporal LogicalFunction nes-logical-operators EverEqTemporalTemporalLogicalFunction.cpp) +add_plugin(EverGeTemporalTemporal LogicalFunction nes-logical-operators EverGeTemporalTemporalLogicalFunction.cpp) +add_plugin(EverGtTemporalTemporal LogicalFunction nes-logical-operators EverGtTemporalTemporalLogicalFunction.cpp) +add_plugin(EverLeTemporalTemporal LogicalFunction nes-logical-operators EverLeTemporalTemporalLogicalFunction.cpp) +add_plugin(EverLtTemporalTemporal LogicalFunction nes-logical-operators EverLtTemporalTemporalLogicalFunction.cpp) +add_plugin(EverNeTemporalTemporal LogicalFunction nes-logical-operators EverNeTemporalTemporalLogicalFunction.cpp) +add_plugin(TemporalFrechetDistance LogicalFunction nes-logical-operators TemporalFrechetDistanceLogicalFunction.cpp) +add_plugin(TemporalHausdorffDistance LogicalFunction nes-logical-operators TemporalHausdorffDistanceLogicalFunction.cpp) +add_plugin(TemporalDyntimewarpDistance LogicalFunction nes-logical-operators TemporalDyntimewarpDistanceLogicalFunction.cpp) +add_plugin(TemporalNADTGeometry LogicalFunction nes-logical-operators TemporalNADTGeometryLogicalFunction.cpp) +add_plugin(TemporalNADTFloat LogicalFunction nes-logical-operators TemporalNADTFloatLogicalFunction.cpp) +add_plugin(TemporalNADTInt LogicalFunction nes-logical-operators TemporalNADTIntLogicalFunction.cpp) +add_plugin(AlwaysEqTfloatFloat LogicalFunction nes-logical-operators AlwaysEqTfloatFloatLogicalFunction.cpp) +add_plugin(AlwaysGeTfloatFloat LogicalFunction nes-logical-operators AlwaysGeTfloatFloatLogicalFunction.cpp) +add_plugin(AlwaysGtTfloatFloat LogicalFunction nes-logical-operators AlwaysGtTfloatFloatLogicalFunction.cpp) +add_plugin(AlwaysLeTfloatFloat LogicalFunction nes-logical-operators AlwaysLeTfloatFloatLogicalFunction.cpp) +add_plugin(AlwaysLtTfloatFloat LogicalFunction nes-logical-operators AlwaysLtTfloatFloatLogicalFunction.cpp) +add_plugin(AlwaysNeTfloatFloat LogicalFunction nes-logical-operators AlwaysNeTfloatFloatLogicalFunction.cpp) +add_plugin(EverEqTfloatFloat LogicalFunction nes-logical-operators EverEqTfloatFloatLogicalFunction.cpp) +add_plugin(EverGeTfloatFloat LogicalFunction nes-logical-operators EverGeTfloatFloatLogicalFunction.cpp) +add_plugin(EverGtTfloatFloat LogicalFunction nes-logical-operators EverGtTfloatFloatLogicalFunction.cpp) +add_plugin(EverLeTfloatFloat LogicalFunction nes-logical-operators EverLeTfloatFloatLogicalFunction.cpp) +add_plugin(EverLtTfloatFloat LogicalFunction nes-logical-operators EverLtTfloatFloatLogicalFunction.cpp) +add_plugin(EverNeTfloatFloat LogicalFunction nes-logical-operators EverNeTfloatFloatLogicalFunction.cpp) +add_plugin(AlwaysEqTintInt LogicalFunction nes-logical-operators AlwaysEqTintIntLogicalFunction.cpp) +add_plugin(AlwaysGeTintInt LogicalFunction nes-logical-operators AlwaysGeTintIntLogicalFunction.cpp) +add_plugin(AlwaysGtTintInt LogicalFunction nes-logical-operators AlwaysGtTintIntLogicalFunction.cpp) +add_plugin(AlwaysLeTintInt LogicalFunction nes-logical-operators AlwaysLeTintIntLogicalFunction.cpp) +add_plugin(AlwaysLtTintInt LogicalFunction nes-logical-operators AlwaysLtTintIntLogicalFunction.cpp) +add_plugin(AlwaysNeTintInt LogicalFunction nes-logical-operators AlwaysNeTintIntLogicalFunction.cpp) +add_plugin(EverEqTintInt LogicalFunction nes-logical-operators EverEqTintIntLogicalFunction.cpp) +add_plugin(EverGeTintInt LogicalFunction nes-logical-operators EverGeTintIntLogicalFunction.cpp) +add_plugin(EverGtTintInt LogicalFunction nes-logical-operators EverGtTintIntLogicalFunction.cpp) +add_plugin(EverLeTintInt LogicalFunction nes-logical-operators EverLeTintIntLogicalFunction.cpp) +add_plugin(EverLtTintInt LogicalFunction nes-logical-operators EverLtTintIntLogicalFunction.cpp) +add_plugin(EverNeTintInt LogicalFunction nes-logical-operators EverNeTintIntLogicalFunction.cpp) +add_plugin(TemporalNADFloatScalar LogicalFunction nes-logical-operators TemporalNADFloatScalarLogicalFunction.cpp) +add_plugin(TemporalNADIntScalar LogicalFunction nes-logical-operators TemporalNADIntScalarLogicalFunction.cpp) +add_plugin(AlwaysEqFloatTfloat LogicalFunction nes-logical-operators AlwaysEqFloatTfloatLogicalFunction.cpp) +add_plugin(AlwaysGeFloatTfloat LogicalFunction nes-logical-operators AlwaysGeFloatTfloatLogicalFunction.cpp) +add_plugin(AlwaysGtFloatTfloat LogicalFunction nes-logical-operators AlwaysGtFloatTfloatLogicalFunction.cpp) +add_plugin(AlwaysLeFloatTfloat LogicalFunction nes-logical-operators AlwaysLeFloatTfloatLogicalFunction.cpp) +add_plugin(AlwaysLtFloatTfloat LogicalFunction nes-logical-operators AlwaysLtFloatTfloatLogicalFunction.cpp) +add_plugin(AlwaysNeFloatTfloat LogicalFunction nes-logical-operators AlwaysNeFloatTfloatLogicalFunction.cpp) +add_plugin(EverEqFloatTfloat LogicalFunction nes-logical-operators EverEqFloatTfloatLogicalFunction.cpp) +add_plugin(EverGeFloatTfloat LogicalFunction nes-logical-operators EverGeFloatTfloatLogicalFunction.cpp) +add_plugin(EverGtFloatTfloat LogicalFunction nes-logical-operators EverGtFloatTfloatLogicalFunction.cpp) +add_plugin(EverLeFloatTfloat LogicalFunction nes-logical-operators EverLeFloatTfloatLogicalFunction.cpp) +add_plugin(EverLtFloatTfloat LogicalFunction nes-logical-operators EverLtFloatTfloatLogicalFunction.cpp) +add_plugin(EverNeFloatTfloat LogicalFunction nes-logical-operators EverNeFloatTfloatLogicalFunction.cpp) +add_plugin(AlwaysEqIntTint LogicalFunction nes-logical-operators AlwaysEqIntTintLogicalFunction.cpp) +add_plugin(AlwaysGeIntTint LogicalFunction nes-logical-operators AlwaysGeIntTintLogicalFunction.cpp) +add_plugin(AlwaysGtIntTint LogicalFunction nes-logical-operators AlwaysGtIntTintLogicalFunction.cpp) +add_plugin(AlwaysLeIntTint LogicalFunction nes-logical-operators AlwaysLeIntTintLogicalFunction.cpp) +add_plugin(AlwaysLtIntTint LogicalFunction nes-logical-operators AlwaysLtIntTintLogicalFunction.cpp) +add_plugin(AlwaysNeIntTint LogicalFunction nes-logical-operators AlwaysNeIntTintLogicalFunction.cpp) +add_plugin(EverEqIntTint LogicalFunction nes-logical-operators EverEqIntTintLogicalFunction.cpp) +add_plugin(EverGeIntTint LogicalFunction nes-logical-operators EverGeIntTintLogicalFunction.cpp) +add_plugin(EverGtIntTint LogicalFunction nes-logical-operators EverGtIntTintLogicalFunction.cpp) +add_plugin(EverLeIntTint LogicalFunction nes-logical-operators EverLeIntTintLogicalFunction.cpp) +add_plugin(EverLtIntTint LogicalFunction nes-logical-operators EverLtIntTintLogicalFunction.cpp) +add_plugin(EverNeIntTint LogicalFunction nes-logical-operators EverNeIntTintLogicalFunction.cpp) +add_plugin(MultTnumberTnumber LogicalFunction nes-logical-operators MultTnumberTnumberLogicalFunction.cpp) +add_plugin(TcontainsTgeoTgeo LogicalFunction nes-logical-operators TcontainsTgeoTgeoLogicalFunction.cpp) +add_plugin(TcoversTgeoTgeo LogicalFunction nes-logical-operators TcoversTgeoTgeoLogicalFunction.cpp) +add_plugin(TdistanceTgeoTgeo LogicalFunction nes-logical-operators TdistanceTgeoTgeoLogicalFunction.cpp) +add_plugin(TcontainsTcbufferTcbuffer LogicalFunction nes-logical-operators TcontainsTcbufferTcbufferLogicalFunction.cpp) +add_plugin(TcoversTcbufferTcbuffer LogicalFunction nes-logical-operators TcoversTcbufferTcbufferLogicalFunction.cpp) +add_plugin(TdistanceTcbufferTcbuffer LogicalFunction nes-logical-operators TdistanceTcbufferTcbufferLogicalFunction.cpp) +add_plugin(TdistanceTnpointTnpoint LogicalFunction nes-logical-operators TdistanceTnpointTnpointLogicalFunction.cpp) +add_plugin(TdistanceTposeTpose LogicalFunction nes-logical-operators TdistanceTposeTposeLogicalFunction.cpp) +add_plugin(TpointLengthWkb LogicalFunction nes-logical-operators TpointLengthWkbLogicalFunction.cpp) +add_plugin(TnpointLength LogicalFunction nes-logical-operators TnpointLengthLogicalFunction.cpp) +add_plugin(TcbufferToTfloat LogicalFunction nes-logical-operators TcbufferToTfloatLogicalFunction.cpp) +add_plugin(NadTcbufferStbox LogicalFunction nes-logical-operators NadTcbufferStboxLogicalFunction.cpp) +add_plugin(NadTnpointStbox LogicalFunction nes-logical-operators NadTnpointStboxLogicalFunction.cpp) +add_plugin(NadTposeStbox LogicalFunction nes-logical-operators NadTposeStboxLogicalFunction.cpp) +add_plugin(AtouchesTpointGeo LogicalFunction nes-logical-operators AtouchesTpointGeoLogicalFunction.cpp) +add_plugin(EtouchesTpointGeo LogicalFunction nes-logical-operators EtouchesTpointGeoLogicalFunction.cpp) +add_plugin(TemporalAContainsGeometry LogicalFunction nes-logical-operators TemporalAContainsGeometryLogicalFunction.cpp) +add_plugin(TemporalADisjointGeometry LogicalFunction nes-logical-operators TemporalADisjointGeometryLogicalFunction.cpp) +add_plugin(TemporalATouchesGeometry LogicalFunction nes-logical-operators TemporalATouchesGeometryLogicalFunction.cpp) +add_plugin(TemporalECoversGeometry LogicalFunction nes-logical-operators TemporalECoversGeometryLogicalFunction.cpp) +add_plugin(TemporalEDisjointGeometry LogicalFunction nes-logical-operators TemporalEDisjointGeometryLogicalFunction.cpp) +add_plugin(TemporalEIntersectsGeometry LogicalFunction nes-logical-operators TemporalEIntersectsGeometryLogicalFunction.cpp) +add_plugin(TemporalETouchesGeometry LogicalFunction nes-logical-operators TemporalETouchesGeometryLogicalFunction.cpp) +add_plugin(TemporalAtGeometry LogicalFunction nes-logical-operators TemporalAtGeometryLogicalFunction.cpp) +add_plugin(TemporalMinusGeometry LogicalFunction nes-logical-operators TemporalMinusGeometryLogicalFunction.cpp) +add_plugin(TemporalADWithinGeometry LogicalFunction nes-logical-operators TemporalADWithinGeometryLogicalFunction.cpp) +add_plugin(TemporalADWithinTGeometry LogicalFunction nes-logical-operators TemporalADWithinTGeometryLogicalFunction.cpp) +add_plugin(TemporalEDWithinTGeometry LogicalFunction nes-logical-operators TemporalEDWithinTGeometryLogicalFunction.cpp) +add_plugin(TemporalAContainsTGeometry LogicalFunction nes-logical-operators TemporalAContainsTGeometryLogicalFunction.cpp) +add_plugin(TemporalADisjointTGeometry LogicalFunction nes-logical-operators TemporalADisjointTGeometryLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTGeometry LogicalFunction nes-logical-operators TemporalAIntersectsTGeometryLogicalFunction.cpp) +add_plugin(TemporalATouchesTGeometry LogicalFunction nes-logical-operators TemporalATouchesTGeometryLogicalFunction.cpp) +add_plugin(TemporalEContainsTGeometry LogicalFunction nes-logical-operators TemporalEContainsTGeometryLogicalFunction.cpp) +add_plugin(TemporalECoversTGeometry LogicalFunction nes-logical-operators TemporalECoversTGeometryLogicalFunction.cpp) +add_plugin(TemporalEDisjointTGeometry LogicalFunction nes-logical-operators TemporalEDisjointTGeometryLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTGeometry LogicalFunction nes-logical-operators TemporalEIntersectsTGeometryLogicalFunction.cpp) +add_plugin(TemporalETouchesTGeometry LogicalFunction nes-logical-operators TemporalETouchesTGeometryLogicalFunction.cpp) +add_plugin(TemporalNADGeometry LogicalFunction nes-logical-operators TemporalNADGeometryLogicalFunction.cpp) +add_plugin(TemporalAContainsTCbuffer LogicalFunction nes-logical-operators TemporalAContainsTCbufferLogicalFunction.cpp) +add_plugin(TemporalACoversTCbuffer LogicalFunction nes-logical-operators TemporalACoversTCbufferLogicalFunction.cpp) +add_plugin(TemporalADisjointTCbuffer LogicalFunction nes-logical-operators TemporalADisjointTCbufferLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTCbuffer LogicalFunction nes-logical-operators TemporalAIntersectsTCbufferLogicalFunction.cpp) +add_plugin(TemporalATouchesTCbuffer LogicalFunction nes-logical-operators TemporalATouchesTCbufferLogicalFunction.cpp) +add_plugin(TemporalEContainsTCbuffer LogicalFunction nes-logical-operators TemporalEContainsTCbufferLogicalFunction.cpp) +add_plugin(TemporalECoversTCbuffer LogicalFunction nes-logical-operators TemporalECoversTCbufferLogicalFunction.cpp) +add_plugin(TemporalEDisjointTCbuffer LogicalFunction nes-logical-operators TemporalEDisjointTCbufferLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTCbuffer LogicalFunction nes-logical-operators TemporalEIntersectsTCbufferLogicalFunction.cpp) +add_plugin(TemporalETouchesTCbuffer LogicalFunction nes-logical-operators TemporalETouchesTCbufferLogicalFunction.cpp) +add_plugin(TemporalNADTCbuffer LogicalFunction nes-logical-operators TemporalNADTCbufferLogicalFunction.cpp) +add_plugin(TemporalADWithinTCbufferGeometry LogicalFunction nes-logical-operators TemporalADWithinTCbufferGeometryLogicalFunction.cpp) +add_plugin(TemporalEDWithinTCbufferGeometry LogicalFunction nes-logical-operators TemporalEDWithinTCbufferGeometryLogicalFunction.cpp) +add_plugin(AlwaysEqTcbufferCbuffer LogicalFunction nes-logical-operators AlwaysEqTcbufferCbufferLogicalFunction.cpp) +add_plugin(AlwaysNeTcbufferCbuffer LogicalFunction nes-logical-operators AlwaysNeTcbufferCbufferLogicalFunction.cpp) +add_plugin(EverEqTcbufferCbuffer LogicalFunction nes-logical-operators EverEqTcbufferCbufferLogicalFunction.cpp) +add_plugin(EverNeTcbufferCbuffer LogicalFunction nes-logical-operators EverNeTcbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalAContainsTCbufferCbuffer LogicalFunction nes-logical-operators TemporalAContainsTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalACoversTCbufferCbuffer LogicalFunction nes-logical-operators TemporalACoversTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalADisjointTCbufferCbuffer LogicalFunction nes-logical-operators TemporalADisjointTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTCbufferCbuffer LogicalFunction nes-logical-operators TemporalAIntersectsTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalATouchesTCbufferCbuffer LogicalFunction nes-logical-operators TemporalATouchesTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalEContainsTCbufferCbuffer LogicalFunction nes-logical-operators TemporalEContainsTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalECoversTCbufferCbuffer LogicalFunction nes-logical-operators TemporalECoversTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalEDisjointTCbufferCbuffer LogicalFunction nes-logical-operators TemporalEDisjointTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTCbufferCbuffer LogicalFunction nes-logical-operators TemporalEIntersectsTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalETouchesTCbufferCbuffer LogicalFunction nes-logical-operators TemporalETouchesTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalNADTCbufferCbuffer LogicalFunction nes-logical-operators TemporalNADTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalADWithinTCbufferCbuffer LogicalFunction nes-logical-operators TemporalADWithinTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalEDWithinTCbufferCbuffer LogicalFunction nes-logical-operators TemporalEDWithinTCbufferCbufferLogicalFunction.cpp) +add_plugin(TemporalADisjointTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalADisjointTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalAIntersectsTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalAIntersectsTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalATouchesTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalATouchesTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalECoversTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalECoversTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalNADTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalNADTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalADWithinTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalADWithinTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalEDWithinTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalEDWithinTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalEIntersectsTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalEIntersectsTCbufferTCbufferLogicalFunction.cpp) +add_plugin(TemporalETouchesTCbufferTCbuffer LogicalFunction nes-logical-operators TemporalETouchesTCbufferTCbufferLogicalFunction.cpp) diff --git a/nes-logical-operators/src/Functions/Meos/ContainedFloatSpanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedFloatSpanLogicalFunction.cpp new file mode 100644 index 0000000000..5d5c263ff4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedFloatSpanLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedFloatSpanLogicalFunction::ContainedFloatSpanLogicalFunction(LogicalFunction arg0, + LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(sp)); +} + +DataType ContainedFloatSpanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedFloatSpanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedFloatSpanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedFloatSpanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainedFloatSpanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedFloatSpanLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedFloatSpanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedFloatSpanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedFloatSpanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedFloatSpanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedFloatSpanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainedFloatSpanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainedFloatSpanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedFloatspanSpanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedFloatspanSpanLogicalFunction.cpp new file mode 100644 index 0000000000..f763dc60a3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedFloatspanSpanLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedFloatspanSpanLogicalFunction::ContainedFloatspanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(sp)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedFloatspanSpanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedFloatspanSpanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedFloatspanSpanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedFloatspanSpanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainedFloatspanSpanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedFloatspanSpanLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedFloatspanSpanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedFloatspanSpanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedFloatspanSpanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedFloatspanSpanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedFloatspanSpanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainedFloatspanSpanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainedFloatspanSpanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedIntSpanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedIntSpanLogicalFunction.cpp new file mode 100644 index 0000000000..b9e1d7fd7d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedIntSpanLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedIntSpanLogicalFunction::ContainedIntSpanLogicalFunction(LogicalFunction arg0, + LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(sp)); +} + +DataType ContainedIntSpanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedIntSpanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedIntSpanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedIntSpanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainedIntSpanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedIntSpanLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedIntSpanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedIntSpanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedIntSpanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedIntSpanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedIntSpanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainedIntSpanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainedIntSpanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedSpanSpanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedSpanSpanLogicalFunction.cpp new file mode 100644 index 0000000000..588cb3ec60 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedSpanSpanLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedSpanSpanLogicalFunction::ContainedSpanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(sp)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedSpanSpanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedSpanSpanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedSpanSpanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedSpanSpanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainedSpanSpanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedSpanSpanLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedSpanSpanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedSpanSpanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedSpanSpanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedSpanSpanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedSpanSpanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainedSpanSpanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainedSpanSpanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..7d74a8a002 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedStboxStboxLogicalFunction::ContainedStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainedStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainedStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainedStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..9d4bbff8e9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedStboxTspatialLogicalFunction::ContainedStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "ContainedStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "ContainedStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return ContainedStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..5c0d5d337f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedTboxTnumberLogicalFunction::ContainedTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "ContainedTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "ContainedTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return ContainedTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..aab7c0741d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedTemporalTemporalLogicalFunction::ContainedTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType ContainedTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "ContainedTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "ContainedTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return ContainedTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..af0131a50c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedTnumberTboxLogicalFunction::ContainedTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "ContainedTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "ContainedTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return ContainedTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..da5580a84d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedTnumberTnumberLogicalFunction::ContainedTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainedTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainedTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainedTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..8786c954a5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedTspatialStboxLogicalFunction::ContainedTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainedTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "ContainedTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "ContainedTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return ContainedTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainedTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainedTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..4af029dbc7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainedTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainedTspatialTspatialLogicalFunction::ContainedTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType ContainedTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainedTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainedTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainedTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "ContainedTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainedTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainedTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainedTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainedTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainedTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainedTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "ContainedTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return ContainedTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsFloatspanSpanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsFloatspanSpanLogicalFunction.cpp new file mode 100644 index 0000000000..7d18687657 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsFloatspanSpanLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsFloatspanSpanLogicalFunction::ContainsFloatspanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(sp)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsFloatspanSpanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsFloatspanSpanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsFloatspanSpanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsFloatspanSpanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainsFloatspanSpanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsFloatspanSpanLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsFloatspanSpanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsFloatspanSpanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsFloatspanSpanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsFloatspanSpanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsFloatspanSpanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainsFloatspanSpanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainsFloatspanSpanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsSpanFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsSpanFloatLogicalFunction.cpp new file mode 100644 index 0000000000..cb629f455f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsSpanFloatLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsSpanFloatLogicalFunction::ContainsSpanFloatLogicalFunction(LogicalFunction sp, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(sp)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsSpanFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsSpanFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsSpanFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsSpanFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainsSpanFloatLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsSpanFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsSpanFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsSpanFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsSpanFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsSpanFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsSpanFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainsSpanFloatLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainsSpanFloatLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsSpanIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsSpanIntLogicalFunction.cpp new file mode 100644 index 0000000000..7c7a3b6db8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsSpanIntLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsSpanIntLogicalFunction::ContainsSpanIntLogicalFunction(LogicalFunction sp, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(sp)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsSpanIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsSpanIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsSpanIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsSpanIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainsSpanIntLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsSpanIntLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsSpanIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsSpanIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsSpanIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsSpanIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsSpanIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainsSpanIntLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainsSpanIntLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsSpanSpanLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsSpanSpanLogicalFunction.cpp new file mode 100644 index 0000000000..49a7fc3708 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsSpanSpanLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsSpanSpanLogicalFunction::ContainsSpanSpanLogicalFunction(LogicalFunction sp, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(sp)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsSpanSpanLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsSpanSpanLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsSpanSpanLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsSpanSpanLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainsSpanSpanLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsSpanSpanLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsSpanSpanLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsSpanSpanLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsSpanSpanLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsSpanSpanLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsSpanSpanLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainsSpanSpanLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainsSpanSpanLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..8a1212bb70 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsStboxStboxLogicalFunction::ContainsStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainsStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainsStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainsStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..4700a411bd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsStboxTspatialLogicalFunction::ContainsStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "ContainsStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "ContainsStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return ContainsStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..8ec554ad34 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsTboxTnumberLogicalFunction::ContainsTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "ContainsTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "ContainsTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return ContainsTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..dba2f02ab5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsTemporalTemporalLogicalFunction::ContainsTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType ContainsTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "ContainsTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "ContainsTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return ContainsTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..63767f455c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsTnumberTboxLogicalFunction::ContainsTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "ContainsTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "ContainsTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return ContainsTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..e985eb045e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsTnumberTnumberLogicalFunction::ContainsTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "ContainsTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "ContainsTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return ContainsTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..ee1f25ce29 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsTspatialStboxLogicalFunction::ContainsTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType ContainsTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "ContainsTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "ContainsTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return ContainsTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/ContainsTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/ContainsTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..e7e95b1537 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/ContainsTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +ContainsTspatialTspatialLogicalFunction::ContainsTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType ContainsTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction ContainsTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector ContainsTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction ContainsTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "ContainsTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view ContainsTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool ContainsTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string ContainsTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction ContainsTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction ContainsTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterContainsTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "ContainsTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return ContainsTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..1b00c9f96d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivBigintTbigintLogicalFunction::DivBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType DivBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "DivBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool DivBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "DivBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return DivBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..631371f221 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivFloatTfloatLogicalFunction::DivFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType DivFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "DivFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool DivFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "DivFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return DivFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..e45dfdab6e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivIntTintLogicalFunction::DivIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType DivIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "DivIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool DivIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "DivIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return DivIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..125d0b2265 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivTbigintBigintLogicalFunction::DivTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType DivTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "DivTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool DivTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "DivTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return DivTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..81a276450b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivTfloatFloatLogicalFunction::DivTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType DivTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "DivTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool DivTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "DivTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return DivTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..8424fd0fe6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivTintIntLogicalFunction::DivTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType DivTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "DivTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool DivTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "DivTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return DivTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/DivTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/DivTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..769a986475 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/DivTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +DivTnumberTnumberLogicalFunction::DivTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType DivTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction DivTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector DivTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction DivTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "DivTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view DivTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool DivTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string DivTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction DivTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction DivTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterDivTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "DivTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return DivTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..7f18fced18 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcontainsGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcontainsGeoTrgeometryLogicalFunction::EcontainsGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); +} +DataType EcontainsGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EcontainsGeoTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EcontainsGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EcontainsGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"EcontainsGeoTrgeometryLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EcontainsGeoTrgeometryLogicalFunction::getType() const { return NAME; } +bool EcontainsGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EcontainsGeoTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EcontainsGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + return withChildren(c); +} +SerializableFunction EcontainsGeoTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcontainsGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "EcontainsGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EcontainsGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..9fefbb6576 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcontainsTcbufferGeoLogicalFunction::EcontainsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EcontainsTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcontainsTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcontainsTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcontainsTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EcontainsTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcontainsTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EcontainsTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcontainsTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcontainsTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcontainsTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcontainsTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EcontainsTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EcontainsTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..695b38213f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcontainsTcbufferTcbufferLogicalFunction::EcontainsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EcontainsTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcontainsTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcontainsTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcontainsTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EcontainsTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcontainsTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EcontainsTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcontainsTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcontainsTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcontainsTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcontainsTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EcontainsTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EcontainsTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcontainsTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcontainsTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..b98b2944e0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcontainsTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcontainsTgeoGeoLogicalFunction::EcontainsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EcontainsTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcontainsTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcontainsTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcontainsTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EcontainsTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcontainsTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EcontainsTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcontainsTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcontainsTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcontainsTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcontainsTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EcontainsTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EcontainsTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..21f0c77808 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcontainsTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcontainsTgeoTgeoLogicalFunction::EcontainsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EcontainsTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcontainsTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcontainsTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcontainsTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EcontainsTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcontainsTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EcontainsTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcontainsTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcontainsTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcontainsTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcontainsTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EcontainsTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EcontainsTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..4c2ab02757 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcoversGeoTrgeometryLogicalFunction::EcoversGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); +} +DataType EcoversGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EcoversGeoTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EcoversGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EcoversGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"EcoversGeoTrgeometryLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EcoversGeoTrgeometryLogicalFunction::getType() const { return NAME; } +bool EcoversGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EcoversGeoTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EcoversGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + return withChildren(c); +} +SerializableFunction EcoversGeoTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "EcoversGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EcoversGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcoversTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..9240106079 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcoversTcbufferGeoLogicalFunction::EcoversTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EcoversTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcoversTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcoversTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcoversTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EcoversTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcoversTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EcoversTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcoversTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcoversTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcoversTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EcoversTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EcoversTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..7c12723ac4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcoversTcbufferTcbufferLogicalFunction::EcoversTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EcoversTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcoversTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcoversTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcoversTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EcoversTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcoversTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EcoversTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcoversTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcoversTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcoversTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EcoversTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EcoversTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcoversTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..6d94e17a84 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcoversTgeoGeoLogicalFunction::EcoversTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EcoversTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcoversTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcoversTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcoversTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EcoversTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcoversTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EcoversTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcoversTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcoversTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcoversTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EcoversTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EcoversTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcoversTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..941cc2bbf7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcoversTgeoTgeoLogicalFunction::EcoversTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EcoversTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EcoversTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EcoversTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EcoversTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EcoversTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EcoversTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EcoversTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EcoversTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EcoversTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EcoversTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EcoversTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EcoversTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..0c7e3e5a6c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EcoversTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EcoversTrgeometryGeoLogicalFunction::EcoversTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType EcoversTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EcoversTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EcoversTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EcoversTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"EcoversTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EcoversTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool EcoversTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EcoversTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EcoversTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction EcoversTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEcoversTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "EcoversTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EcoversTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..47a7b04f63 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdisjointTcbufferGeoLogicalFunction::EdisjointTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EdisjointTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdisjointTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdisjointTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdisjointTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EdisjointTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdisjointTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EdisjointTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdisjointTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdisjointTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdisjointTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EdisjointTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EdisjointTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..b726ae1e3e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdisjointTcbufferTcbufferLogicalFunction::EdisjointTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EdisjointTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdisjointTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdisjointTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdisjointTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EdisjointTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdisjointTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EdisjointTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdisjointTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdisjointTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdisjointTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EdisjointTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EdisjointTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdisjointTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..abc58472b6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdisjointTgeoGeoLogicalFunction::EdisjointTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EdisjointTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdisjointTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdisjointTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdisjointTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EdisjointTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdisjointTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EdisjointTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdisjointTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdisjointTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdisjointTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EdisjointTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EdisjointTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..6b82563efa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdisjointTgeoTgeoLogicalFunction::EdisjointTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EdisjointTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdisjointTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdisjointTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdisjointTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EdisjointTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdisjointTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EdisjointTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdisjointTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdisjointTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdisjointTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EdisjointTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EdisjointTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..50158a3c09 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdisjointTrgeometryGeoLogicalFunction::EdisjointTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType EdisjointTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EdisjointTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EdisjointTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EdisjointTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"EdisjointTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EdisjointTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool EdisjointTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EdisjointTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EdisjointTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction EdisjointTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "EdisjointTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EdisjointTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..58be13e487 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,99 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdisjointTrgeometryTrgeometryLogicalFunction::EdisjointTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} +DataType EdisjointTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EdisjointTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EdisjointTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EdisjointTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==10,"EdisjointTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EdisjointTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } +bool EdisjointTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EdisjointTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EdisjointTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(10); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} +SerializableFunction EdisjointTrgeometryTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdisjointTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==10, + "EdisjointTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return EdisjointTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..18c244d549 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferCbufferLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTcbufferCbufferLogicalFunction::EdwithinTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); + parameters.push_back(std::move(dist)); +} + +DataType EdwithinTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdwithinTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdwithinTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdwithinTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EdwithinTcbufferCbufferLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdwithinTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EdwithinTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdwithinTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdwithinTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdwithinTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EdwithinTcbufferCbufferLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EdwithinTcbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..4dd5708103 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTcbufferGeoLogicalFunction::EdwithinTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType EdwithinTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdwithinTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdwithinTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdwithinTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EdwithinTcbufferGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdwithinTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EdwithinTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdwithinTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdwithinTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdwithinTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EdwithinTcbufferGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EdwithinTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..a831104e2a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTcbufferTcbufferLogicalFunction::EdwithinTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(9); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType EdwithinTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdwithinTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdwithinTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdwithinTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "EdwithinTcbufferTcbufferLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdwithinTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EdwithinTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdwithinTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdwithinTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdwithinTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "EdwithinTcbufferTcbufferLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return EdwithinTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..60e4cdff41 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTgeoGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTgeoGeoLogicalFunction::EdwithinTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType EdwithinTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdwithinTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdwithinTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdwithinTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EdwithinTgeoGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdwithinTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EdwithinTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdwithinTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdwithinTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdwithinTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EdwithinTgeoGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EdwithinTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..cf1db629b2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTgeoTgeoLogicalFunction::EdwithinTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(7); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType EdwithinTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EdwithinTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EdwithinTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EdwithinTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "EdwithinTgeoTgeoLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EdwithinTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EdwithinTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EdwithinTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EdwithinTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EdwithinTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "EdwithinTgeoTgeoLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return EdwithinTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..0734badbad --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,90 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTrgeometryGeoLogicalFunction::EdwithinTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt, LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(dist)); +} +DataType EdwithinTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EdwithinTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EdwithinTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EdwithinTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==7,"EdwithinTrgeometryGeoLogicalFunction requires 7 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EdwithinTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool EdwithinTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EdwithinTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EdwithinTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(7); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "dist must be FLOAT64"); + return withChildren(c); +} +SerializableFunction EdwithinTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==7, + "EdwithinTrgeometryGeoLogicalFunction requires 7 children but got {}", + arguments.children.size()); + return EdwithinTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..c4bbcf8dbf --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EdwithinTrgeometryTrgeometryLogicalFunction::EdwithinTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2, LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(11); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); + parameters.push_back(std::move(dist)); +} +DataType EdwithinTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EdwithinTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EdwithinTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EdwithinTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==11,"EdwithinTrgeometryTrgeometryLogicalFunction requires 11 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EdwithinTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } +bool EdwithinTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EdwithinTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EdwithinTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(11); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + INVARIANT(c[10].getDataType().isType(DataType::Type::FLOAT64), "dist must be FLOAT64"); + return withChildren(c); +} +SerializableFunction EdwithinTrgeometryTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEdwithinTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==11, + "EdwithinTrgeometryTrgeometryLogicalFunction requires 11 children but got {}", + arguments.children.size()); + return EdwithinTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9]), + std::move(arguments.children[10])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..9d615530ba --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EintersectsTcbufferGeoLogicalFunction::EintersectsTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EintersectsTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EintersectsTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EintersectsTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EintersectsTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EintersectsTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EintersectsTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EintersectsTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EintersectsTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EintersectsTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EintersectsTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EintersectsTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EintersectsTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..a4fa763245 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EintersectsTcbufferTcbufferLogicalFunction::EintersectsTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EintersectsTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EintersectsTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EintersectsTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EintersectsTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EintersectsTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EintersectsTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EintersectsTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EintersectsTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EintersectsTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EintersectsTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EintersectsTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EintersectsTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EintersectsTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..afc567b32d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EintersectsTgeoGeoLogicalFunction::EintersectsTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EintersectsTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EintersectsTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EintersectsTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EintersectsTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EintersectsTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EintersectsTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EintersectsTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EintersectsTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EintersectsTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EintersectsTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EintersectsTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EintersectsTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..4df0ac0ff8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EintersectsTgeoTgeoLogicalFunction::EintersectsTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EintersectsTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EintersectsTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EintersectsTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EintersectsTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EintersectsTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EintersectsTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EintersectsTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EintersectsTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EintersectsTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EintersectsTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EintersectsTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EintersectsTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..de239c4308 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EintersectsTrgeometryGeoLogicalFunction::EintersectsTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType EintersectsTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EintersectsTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EintersectsTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EintersectsTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"EintersectsTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EintersectsTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool EintersectsTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EintersectsTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EintersectsTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction EintersectsTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "EintersectsTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EintersectsTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..19503ba82e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,99 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EintersectsTrgeometryTrgeometryLogicalFunction::EintersectsTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} +DataType EintersectsTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EintersectsTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EintersectsTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EintersectsTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==10,"EintersectsTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EintersectsTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } +bool EintersectsTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EintersectsTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EintersectsTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(10); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} +SerializableFunction EintersectsTrgeometryTrgeometryLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEintersectsTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==10, + "EintersectsTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return EintersectsTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..39243a3c07 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EtouchesTcbufferGeoLogicalFunction::EtouchesTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EtouchesTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EtouchesTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EtouchesTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EtouchesTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EtouchesTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EtouchesTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EtouchesTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EtouchesTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EtouchesTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EtouchesTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EtouchesTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EtouchesTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..56807c62a9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EtouchesTcbufferTcbufferLogicalFunction::EtouchesTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EtouchesTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EtouchesTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EtouchesTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EtouchesTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EtouchesTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EtouchesTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EtouchesTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EtouchesTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EtouchesTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EtouchesTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EtouchesTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EtouchesTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EtouchesTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..c66d13f6ff --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EtouchesTgeoGeoLogicalFunction::EtouchesTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EtouchesTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EtouchesTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EtouchesTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EtouchesTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EtouchesTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EtouchesTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EtouchesTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EtouchesTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EtouchesTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EtouchesTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EtouchesTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EtouchesTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..3aa67d96ea --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EtouchesTgeoTgeoLogicalFunction::EtouchesTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EtouchesTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EtouchesTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EtouchesTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EtouchesTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EtouchesTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EtouchesTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EtouchesTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EtouchesTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EtouchesTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EtouchesTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EtouchesTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EtouchesTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EtouchesTpointGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTpointGeoLogicalFunction.cpp new file mode 100644 index 0000000000..12167cc82d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTpointGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EtouchesTpointGeoLogicalFunction::EtouchesTpointGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EtouchesTpointGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EtouchesTpointGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EtouchesTpointGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EtouchesTpointGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EtouchesTpointGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EtouchesTpointGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EtouchesTpointGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EtouchesTpointGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EtouchesTpointGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EtouchesTpointGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTpointGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EtouchesTpointGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EtouchesTpointGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..f965f540b0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EtouchesTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EtouchesTrgeometryGeoLogicalFunction::EtouchesTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(tgt_wkt)); +} +DataType EtouchesTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } +LogicalFunction EtouchesTrgeometryGeoLogicalFunction::withDataType(const DataType& d) const { auto c=*this; c.dataType=d; return c; } +std::vector EtouchesTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } +LogicalFunction EtouchesTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const { + PRECONDITION(children.size()==6,"EtouchesTrgeometryGeoLogicalFunction requires 6 children, but got {}",children.size()); + auto c=*this; c.parameters=children; return c; +} +std::string_view EtouchesTrgeometryGeoLogicalFunction::getType() const { return NAME; } +bool EtouchesTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { + if (const auto* o=dynamic_cast(&rhs)) return parameters==o->parameters; + return false; +} +std::string EtouchesTrgeometryGeoLogicalFunction::explain(ExplainVerbosity v) const { + return fmt::format("{}({})",NAME,parameters[0].explain(v)); +} +LogicalFunction EtouchesTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const { + std::vector c; c.reserve(6); + for (const auto& p : parameters) c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} +SerializableFunction EtouchesTrgeometryGeoLogicalFunction::serialize() const { + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& ch : parameters) proto.add_children()->CopyFrom(ch.serialize()); + return proto; +} +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEtouchesTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size()==6, + "EtouchesTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EtouchesTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..864893e88b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqBigintTbigintLogicalFunction::EverEqBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..3a4133298c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqBoolTboolLogicalFunction::EverEqBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..92f5f38849 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqFloatTfloatLogicalFunction::EverEqFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..ebb66482a8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqGeoTrgeometryLogicalFunction::EverEqGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction EverEqGeoTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector EverEqGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction EverEqGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "EverEqGeoTrgeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view EverEqGeoTrgeometryLogicalFunction::getType() const { return NAME; } + +bool EverEqGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string EverEqGeoTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction EverEqGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + return withChildren(c); +} + +SerializableFunction EverEqGeoTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverEqGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EverEqGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..6ffc33fbd6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqIntTintLogicalFunction::EverEqIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqNpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqNpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..871f07be96 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqNpointTnpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqNpointTnpointLogicalFunction::EverEqNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqNpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqNpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqNpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqNpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EverEqNpointTnpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqNpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqNpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqNpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqNpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqNpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqNpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EverEqNpointTnpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EverEqNpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqPoseTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqPoseTposeLogicalFunction.cpp new file mode 100644 index 0000000000..c39c1c8c08 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqPoseTposeLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqPoseTposeLogicalFunction::EverEqPoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqPoseTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqPoseTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqPoseTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqPoseTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "EverEqPoseTposeLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqPoseTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqPoseTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqPoseTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqPoseTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqPoseTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqPoseTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "EverEqPoseTposeLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return EverEqPoseTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..7f2234bf54 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTbigintBigintLogicalFunction::EverEqTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverEqTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..6852f2555c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTboolBoolLogicalFunction::EverEqTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverEqTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..c0d051e6b7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTcbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTcbufferCbufferLogicalFunction::EverEqTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType EverEqTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EverEqTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EverEqTcbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EverEqTcbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..7bb52f7c93 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTcbufferTcbufferLogicalFunction::EverEqTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverEqTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EverEqTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EverEqTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EverEqTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..78b0aafc28 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTemporalTemporalLogicalFunction::EverEqTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverEqTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverEqTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverEqTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverEqTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..ee6fc42cf3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTextTtextLogicalFunction::EverEqTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..4040bb6ce6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTfloatFloatLogicalFunction::EverEqTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..f5df65830b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTgeoGeoLogicalFunction::EverEqTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EverEqTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EverEqTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EverEqTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EverEqTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..9f6d953b1e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTgeoTgeoLogicalFunction::EverEqTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverEqTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverEqTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverEqTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverEqTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.cpp new file mode 100644 index 0000000000..34752cdb45 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTh3indexH3indexLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTh3indexH3indexLogicalFunction::EverEqTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverEqTh3indexH3indexLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTh3indexH3indexLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTh3indexH3indexLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTh3indexH3indexLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTh3indexH3indexLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTh3indexH3indexLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTh3indexH3indexLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTh3indexH3indexLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTh3indexH3indexLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTh3indexH3indexLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTh3indexH3indexLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTh3indexH3indexLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTh3indexH3indexLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..2b56909d94 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTintIntLogicalFunction::EverEqTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverEqTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.cpp new file mode 100644 index 0000000000..5056a5e819 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTjsonbJsonbLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTjsonbJsonbLogicalFunction::EverEqTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverEqTjsonbJsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTjsonbJsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTjsonbJsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTjsonbJsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTjsonbJsonbLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTjsonbJsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTjsonbJsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTjsonbJsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTjsonbJsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTjsonbJsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTjsonbJsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTjsonbJsonbLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTjsonbJsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.cpp new file mode 100644 index 0000000000..46940a49fd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTjsonbTjsonbLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTjsonbTjsonbLogicalFunction::EverEqTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(json0)); + parameters.push_back(std::move(ts0)); +} + +DataType EverEqTjsonbTjsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTjsonbTjsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTjsonbTjsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTjsonbTjsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EverEqTjsonbTjsonbLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTjsonbTjsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTjsonbTjsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTjsonbTjsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTjsonbTjsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTjsonbTjsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTjsonbTjsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EverEqTjsonbTjsonbLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EverEqTjsonbTjsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTnpointNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTnpointNpointLogicalFunction.cpp new file mode 100644 index 0000000000..1e3de77220 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTnpointNpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTnpointNpointLogicalFunction::EverEqTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); +} + +DataType EverEqTnpointNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTnpointNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTnpointNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTnpointNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EverEqTnpointNpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTnpointNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTnpointNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTnpointNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTnpointNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTnpointNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTnpointNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EverEqTnpointNpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EverEqTnpointNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTnpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTnpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..5d2f35f867 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTnpointTnpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTnpointTnpointLogicalFunction::EverEqTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(ts0)); +} + +DataType EverEqTnpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTnpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTnpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTnpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverEqTnpointTnpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTnpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTnpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTnpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTnpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTnpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTnpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverEqTnpointTnpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverEqTnpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTposePoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTposePoseLogicalFunction.cpp new file mode 100644 index 0000000000..2e2bec44ee --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTposePoseLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTposePoseLogicalFunction::EverEqTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); +} + +DataType EverEqTposePoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTposePoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTposePoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTposePoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "EverEqTposePoseLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTposePoseLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTposePoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTposePoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTposePoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTposePoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTposePoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "EverEqTposePoseLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return EverEqTposePoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTposeTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTposeTposeLogicalFunction.cpp new file mode 100644 index 0000000000..853a1965d8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTposeTposeLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTposeTposeLogicalFunction::EverEqTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(ts0)); +} + +DataType EverEqTposeTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTposeTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTposeTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTposeTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EverEqTposeTposeLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTposeTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTposeTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTposeTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTposeTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTposeTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTposeTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EverEqTposeTposeLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EverEqTposeTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.cpp new file mode 100644 index 0000000000..68b91bc2f7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTquadbinQuadbinLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTquadbinQuadbinLogicalFunction::EverEqTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverEqTquadbinQuadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTquadbinQuadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTquadbinQuadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTquadbinQuadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTquadbinQuadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTquadbinQuadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTquadbinQuadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTquadbinQuadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTquadbinQuadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTquadbinQuadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTquadbinQuadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTquadbinQuadbinLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTquadbinQuadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..7cafe5215e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTrgeometryGeoLogicalFunction::EverEqTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType EverEqTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction EverEqTrgeometryGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector EverEqTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction EverEqTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "EverEqTrgeometryGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view EverEqTrgeometryGeoLogicalFunction::getType() const { return NAME; } + +bool EverEqTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string EverEqTrgeometryGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction EverEqTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} + +SerializableFunction EverEqTrgeometryGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverEqTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EverEqTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..c515021fdb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTrgeometryTrgeometryLogicalFunction::EverEqTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} + +DataType EverEqTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction EverEqTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector EverEqTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction EverEqTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 10, + "EverEqTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view EverEqTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } + +bool EverEqTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string EverEqTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction EverEqTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(10); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} + +SerializableFunction EverEqTrgeometryTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 10, + "EverEqTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return EverEqTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverEqTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverEqTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..d2c4a486b7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverEqTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverEqTtextTextLogicalFunction::EverEqTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverEqTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverEqTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverEqTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverEqTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverEqTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverEqTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverEqTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverEqTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverEqTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverEqTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverEqTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverEqTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverEqTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..78b895c301 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeBigintTbigintLogicalFunction::EverGeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGeBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..697f148dce --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeFloatTfloatLogicalFunction::EverGeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..b142c67ca2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeIntTintLogicalFunction::EverGeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..1c31583392 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeTbigintBigintLogicalFunction::EverGeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverGeTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..b567a1ace6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeTemporalTemporalLogicalFunction::EverGeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverGeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverGeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverGeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverGeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..9883fc5650 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeTextTtextLogicalFunction::EverGeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..cd81134751 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeTfloatFloatLogicalFunction::EverGeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverGeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..96c9864bcb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeTintIntLogicalFunction::EverGeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverGeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..d359fba87b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGeTtextTextLogicalFunction::EverGeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverGeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..c792984318 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtBigintTbigintLogicalFunction::EverGtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGtBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..d8971ddb08 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtFloatTfloatLogicalFunction::EverGtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGtFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..2d9338306c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtIntTintLogicalFunction::EverGtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGtIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..8da472b003 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtTbigintBigintLogicalFunction::EverGtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverGtTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..0ad463dff8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtTemporalTemporalLogicalFunction::EverGtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverGtTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverGtTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverGtTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverGtTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..2ca13314b5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtTextTtextLogicalFunction::EverGtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverGtTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..39272b2d03 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtTfloatFloatLogicalFunction::EverGtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverGtTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..2f7a1ff7d2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtTintIntLogicalFunction::EverGtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverGtTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverGtTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverGtTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..14e829a997 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverGtTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverGtTtextTextLogicalFunction::EverGtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverGtTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverGtTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverGtTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverGtTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverGtTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverGtTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverGtTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverGtTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverGtTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverGtTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverGtTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverGtTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverGtTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..881ba52b9f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeBigintTbigintLogicalFunction::EverLeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLeBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..9e9b8c1c34 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeFloatTfloatLogicalFunction::EverLeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..c727735818 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeIntTintLogicalFunction::EverLeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..7dc5c9a64f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeTbigintBigintLogicalFunction::EverLeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverLeTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..91c4d8cec0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeTemporalTemporalLogicalFunction::EverLeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverLeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverLeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverLeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverLeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..2f4dade5f3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeTextTtextLogicalFunction::EverLeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..51fda73fe8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeTfloatFloatLogicalFunction::EverLeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverLeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..c4d7f77891 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeTintIntLogicalFunction::EverLeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverLeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..1bf577de92 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLeTtextTextLogicalFunction::EverLeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverLeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..b7a990d9de --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtBigintTbigintLogicalFunction::EverLtBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLtBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..560c412bfa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtFloatTfloatLogicalFunction::EverLtFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLtFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..1e4996ce92 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtIntTintLogicalFunction::EverLtIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLtIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..961b849b64 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtTbigintBigintLogicalFunction::EverLtTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverLtTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..f747d837fb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtTemporalTemporalLogicalFunction::EverLtTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverLtTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverLtTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverLtTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverLtTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..770c5616d2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtTextTtextLogicalFunction::EverLtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverLtTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..99baf5c2c8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtTfloatFloatLogicalFunction::EverLtTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverLtTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..8b62536851 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtTintIntLogicalFunction::EverLtTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverLtTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverLtTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverLtTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..5c9c4b205f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverLtTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverLtTtextTextLogicalFunction::EverLtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverLtTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverLtTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverLtTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverLtTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverLtTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverLtTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverLtTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverLtTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverLtTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverLtTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverLtTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverLtTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverLtTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..6d5d2c09e3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeBigintTbigintLogicalFunction::EverNeBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..053999a793 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeBoolTboolLogicalFunction::EverNeBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..38405e7b77 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeFloatTfloatLogicalFunction::EverNeFloatTfloatLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..713fd63c7a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeGeoTrgeometryLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeGeoTrgeometryLogicalFunction::EverNeGeoTrgeometryLogicalFunction(LogicalFunction tgt_wkt, LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(tgt_wkt)); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeGeoTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction EverNeGeoTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector EverNeGeoTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction EverNeGeoTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "EverNeGeoTrgeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view EverNeGeoTrgeometryLogicalFunction::getType() const { return NAME; } + +bool EverNeGeoTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string EverNeGeoTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction EverNeGeoTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + return withChildren(c); +} + +SerializableFunction EverNeGeoTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeGeoTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverNeGeoTrgeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EverNeGeoTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..e11016a489 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeIntTintLogicalFunction::EverNeIntTintLogicalFunction(LogicalFunction scalar, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(scalar)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeNpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeNpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..59ef66efd1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeNpointTnpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeNpointTnpointLogicalFunction::EverNeNpointTnpointLogicalFunction(LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeNpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeNpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeNpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeNpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EverNeNpointTnpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeNpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeNpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeNpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeNpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeNpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeNpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EverNeNpointTnpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EverNeNpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNePoseTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNePoseTposeLogicalFunction.cpp new file mode 100644 index 0000000000..3c110a3dc7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNePoseTposeLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNePoseTposeLogicalFunction::EverNePoseTposeLogicalFunction(LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); +} + +DataType EverNePoseTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNePoseTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNePoseTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNePoseTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "EverNePoseTposeLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNePoseTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNePoseTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNePoseTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNePoseTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNePoseTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNePoseTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "EverNePoseTposeLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return EverNePoseTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..3698687e78 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTbigintBigintLogicalFunction::EverNeTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverNeTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..e7d5566f0d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTboolBoolLogicalFunction::EverNeTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverNeTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..ffc948f830 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTcbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTcbufferCbufferLogicalFunction::EverNeTcbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType EverNeTcbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTcbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTcbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTcbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EverNeTcbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTcbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTcbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTcbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTcbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTcbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTcbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EverNeTcbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EverNeTcbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..c8803e0ce4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTcbufferTcbufferLogicalFunction::EverNeTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverNeTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EverNeTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EverNeTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EverNeTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..de4c1c7d9d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTemporalTemporalLogicalFunction::EverNeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverNeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverNeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverNeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverNeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..3d9fd6aaf8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTextTtextLogicalFunction::EverNeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..3af642efb6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTfloatFloatLogicalFunction::EverNeTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..d38eadf9ac --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTgeoGeoLogicalFunction::EverNeTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType EverNeTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EverNeTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EverNeTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EverNeTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..ea35026f84 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTgeoTgeoLogicalFunction::EverNeTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType EverNeTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverNeTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverNeTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverNeTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.cpp new file mode 100644 index 0000000000..f1cf201c6c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTh3indexH3indexLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTh3indexH3indexLogicalFunction::EverNeTh3indexH3indexLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverNeTh3indexH3indexLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTh3indexH3indexLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTh3indexH3indexLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTh3indexH3indexLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTh3indexH3indexLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTh3indexH3indexLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTh3indexH3indexLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTh3indexH3indexLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTh3indexH3indexLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTh3indexH3indexLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTh3indexH3indexLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTh3indexH3indexLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTh3indexH3indexLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..0abd61e5f9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTintIntLogicalFunction::EverNeTintIntLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType EverNeTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.cpp new file mode 100644 index 0000000000..8780a344b4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTjsonbJsonbLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTjsonbJsonbLogicalFunction::EverNeTjsonbJsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverNeTjsonbJsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTjsonbJsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTjsonbJsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTjsonbJsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTjsonbJsonbLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTjsonbJsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTjsonbJsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTjsonbJsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTjsonbJsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTjsonbJsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTjsonbJsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTjsonbJsonbLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTjsonbJsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.cpp new file mode 100644 index 0000000000..4f44f47a2c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTjsonbTjsonbLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTjsonbTjsonbLogicalFunction::EverNeTjsonbTjsonbLogicalFunction(LogicalFunction json_str, + LogicalFunction ts, + LogicalFunction json0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(json_str)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(json0)); + parameters.push_back(std::move(ts0)); +} + +DataType EverNeTjsonbTjsonbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTjsonbTjsonbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTjsonbTjsonbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTjsonbTjsonbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "EverNeTjsonbTjsonbLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTjsonbTjsonbLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTjsonbTjsonbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTjsonbTjsonbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTjsonbTjsonbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTjsonbTjsonbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTjsonbTjsonbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "EverNeTjsonbTjsonbLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return EverNeTjsonbTjsonbLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTnpointNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTnpointNpointLogicalFunction.cpp new file mode 100644 index 0000000000..9113ad55ab --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTnpointNpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTnpointNpointLogicalFunction::EverNeTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); +} + +DataType EverNeTnpointNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTnpointNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTnpointNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTnpointNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "EverNeTnpointNpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTnpointNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTnpointNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTnpointNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTnpointNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTnpointNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTnpointNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "EverNeTnpointNpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return EverNeTnpointNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTnpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTnpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..9bfa9beba0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTnpointTnpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTnpointTnpointLogicalFunction::EverNeTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(ts0)); +} + +DataType EverNeTnpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTnpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTnpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTnpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "EverNeTnpointTnpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTnpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTnpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTnpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTnpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTnpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTnpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverNeTnpointTnpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return EverNeTnpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTposePoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTposePoseLogicalFunction.cpp new file mode 100644 index 0000000000..ce7e0d90b6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTposePoseLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTposePoseLogicalFunction::EverNeTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); +} + +DataType EverNeTposePoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTposePoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTposePoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTposePoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "EverNeTposePoseLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTposePoseLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTposePoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTposePoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTposePoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTposePoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTposePoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "EverNeTposePoseLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return EverNeTposePoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTposeTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTposeTposeLogicalFunction.cpp new file mode 100644 index 0000000000..2d9d834489 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTposeTposeLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTposeTposeLogicalFunction::EverNeTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(ts0)); +} + +DataType EverNeTposeTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTposeTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTposeTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTposeTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "EverNeTposeTposeLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTposeTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTposeTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTposeTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTposeTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTposeTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTposeTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "EverNeTposeTposeLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return EverNeTposeTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.cpp new file mode 100644 index 0000000000..36ed65ef1f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTquadbinQuadbinLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTquadbinQuadbinLogicalFunction::EverNeTquadbinQuadbinLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverNeTquadbinQuadbinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTquadbinQuadbinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTquadbinQuadbinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTquadbinQuadbinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTquadbinQuadbinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTquadbinQuadbinLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTquadbinQuadbinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTquadbinQuadbinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTquadbinQuadbinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTquadbinQuadbinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTquadbinQuadbinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTquadbinQuadbinLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTquadbinQuadbinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..7b26b63505 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTrgeometryGeoLogicalFunction::EverNeTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType EverNeTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction EverNeTrgeometryGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector EverNeTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction EverNeTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "EverNeTrgeometryGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view EverNeTrgeometryGeoLogicalFunction::getType() const { return NAME; } + +bool EverNeTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string EverNeTrgeometryGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction EverNeTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} + +SerializableFunction EverNeTrgeometryGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "EverNeTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return EverNeTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..c9d2a7406c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTrgeometryTrgeometryLogicalFunction::EverNeTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} + +DataType EverNeTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction EverNeTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector EverNeTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction EverNeTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 10, + "EverNeTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view EverNeTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } + +bool EverNeTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string EverNeTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction EverNeTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(10); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} + +SerializableFunction EverNeTrgeometryTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 10, + "EverNeTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return EverNeTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/EverNeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/EverNeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..e2f15d6df1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/EverNeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +EverNeTtextTextLogicalFunction::EverNeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType EverNeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction EverNeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector EverNeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction EverNeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "EverNeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view EverNeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool EverNeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string EverNeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction EverNeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction EverNeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterEverNeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "EverNeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return EverNeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FloatspanLowerIncLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FloatspanLowerIncLogicalFunction.cpp new file mode 100644 index 0000000000..430491bc98 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FloatspanLowerIncLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FloatspanLowerIncLogicalFunction::FloatspanLowerIncLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType FloatspanLowerIncLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FloatspanLowerIncLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FloatspanLowerIncLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FloatspanLowerIncLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "FloatspanLowerIncLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FloatspanLowerIncLogicalFunction::getType() const +{ + return NAME; +} + +bool FloatspanLowerIncLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FloatspanLowerIncLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FloatspanLowerIncLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FloatspanLowerIncLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFloatspanLowerIncLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "FloatspanLowerIncLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return FloatspanLowerIncLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FloatspanLowerLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FloatspanLowerLogicalFunction.cpp new file mode 100644 index 0000000000..e961f8e0b4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FloatspanLowerLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FloatspanLowerLogicalFunction::FloatspanLowerLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType FloatspanLowerLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FloatspanLowerLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FloatspanLowerLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FloatspanLowerLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "FloatspanLowerLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FloatspanLowerLogicalFunction::getType() const +{ + return NAME; +} + +bool FloatspanLowerLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FloatspanLowerLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FloatspanLowerLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FloatspanLowerLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFloatspanLowerLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "FloatspanLowerLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return FloatspanLowerLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FloatspanUpperIncLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FloatspanUpperIncLogicalFunction.cpp new file mode 100644 index 0000000000..dca8cf5e30 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FloatspanUpperIncLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FloatspanUpperIncLogicalFunction::FloatspanUpperIncLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType FloatspanUpperIncLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FloatspanUpperIncLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FloatspanUpperIncLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FloatspanUpperIncLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "FloatspanUpperIncLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FloatspanUpperIncLogicalFunction::getType() const +{ + return NAME; +} + +bool FloatspanUpperIncLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FloatspanUpperIncLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FloatspanUpperIncLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FloatspanUpperIncLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFloatspanUpperIncLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "FloatspanUpperIncLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return FloatspanUpperIncLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FloatspanUpperLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FloatspanUpperLogicalFunction.cpp new file mode 100644 index 0000000000..7585c8c5d5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FloatspanUpperLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FloatspanUpperLogicalFunction::FloatspanUpperLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType FloatspanUpperLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FloatspanUpperLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FloatspanUpperLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FloatspanUpperLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "FloatspanUpperLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FloatspanUpperLogicalFunction::getType() const +{ + return NAME; +} + +bool FloatspanUpperLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FloatspanUpperLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FloatspanUpperLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FloatspanUpperLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFloatspanUpperLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "FloatspanUpperLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return FloatspanUpperLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FloatspanWidthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FloatspanWidthLogicalFunction.cpp new file mode 100644 index 0000000000..09ac3faa99 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FloatspanWidthLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FloatspanWidthLogicalFunction::FloatspanWidthLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType FloatspanWidthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FloatspanWidthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FloatspanWidthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FloatspanWidthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "FloatspanWidthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FloatspanWidthLogicalFunction::getType() const +{ + return NAME; +} + +bool FloatspanWidthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FloatspanWidthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FloatspanWidthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FloatspanWidthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFloatspanWidthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "FloatspanWidthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return FloatspanWidthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FrontStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FrontStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..12bfa01b4d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FrontStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FrontStboxStboxLogicalFunction::FrontStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType FrontStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FrontStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FrontStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FrontStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "FrontStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FrontStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool FrontStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FrontStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FrontStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FrontStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFrontStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "FrontStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return FrontStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FrontStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FrontStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..414fc17f91 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FrontStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FrontStboxTspatialLogicalFunction::FrontStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType FrontStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FrontStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FrontStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FrontStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "FrontStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FrontStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool FrontStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FrontStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FrontStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FrontStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFrontStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "FrontStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return FrontStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FrontTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FrontTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..85632ea099 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FrontTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FrontTspatialStboxLogicalFunction::FrontTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType FrontTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FrontTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FrontTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FrontTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "FrontTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FrontTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool FrontTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FrontTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FrontTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FrontTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFrontTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "FrontTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return FrontTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/FrontTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/FrontTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..5413d35f48 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/FrontTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +FrontTspatialTspatialLogicalFunction::FrontTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType FrontTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction FrontTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector FrontTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction FrontTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "FrontTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view FrontTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool FrontTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string FrontTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction FrontTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction FrontTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterFrontTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "FrontTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return FrontTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoAsEwktLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoAsEwktLogicalFunction.cpp new file mode 100644 index 0000000000..9e337e68d3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoAsEwktLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoAsEwktLogicalFunction::GeoAsEwktLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoAsEwktLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoAsEwktLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoAsEwktLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoAsEwktLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoAsEwktLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoAsEwktLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoAsEwktLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoAsEwktLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoAsEwktLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoAsEwktLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoAsEwktLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoAsEwktLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoAsEwktLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoAsGeojsonLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoAsGeojsonLogicalFunction.cpp new file mode 100644 index 0000000000..e0844620d3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoAsGeojsonLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoAsGeojsonLogicalFunction::GeoAsGeojsonLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType GeoAsGeojsonLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoAsGeojsonLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoAsGeojsonLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoAsGeojsonLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeoAsGeojsonLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoAsGeojsonLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoAsGeojsonLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoAsGeojsonLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoAsGeojsonLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoAsGeojsonLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoAsGeojsonLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeoAsGeojsonLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeoAsGeojsonLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoEqualsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoEqualsLogicalFunction.cpp new file mode 100644 index 0000000000..51a90ef6ef --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoEqualsLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoEqualsLogicalFunction::GeoEqualsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoEqualsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoEqualsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoEqualsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoEqualsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoEqualsLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoEqualsLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoEqualsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoEqualsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoEqualsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoEqualsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoEqualsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoEqualsLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoEqualsLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoGeoNLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoGeoNLogicalFunction.cpp new file mode 100644 index 0000000000..1ddef28bc9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoGeoNLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoGeoNLogicalFunction::GeoGeoNLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoGeoNLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoGeoNLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoGeoNLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoGeoNLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoGeoNLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoGeoNLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoGeoNLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoGeoNLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoGeoNLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoGeoNLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoGeoNLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoGeoNLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoGeoNLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoIsUnitaryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoIsUnitaryLogicalFunction.cpp new file mode 100644 index 0000000000..c463b71a52 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoIsUnitaryLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoIsUnitaryLogicalFunction::GeoIsUnitaryLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeoIsUnitaryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoIsUnitaryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoIsUnitaryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoIsUnitaryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoIsUnitaryLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoIsUnitaryLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoIsUnitaryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoIsUnitaryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoIsUnitaryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoIsUnitaryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoIsUnitaryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoIsUnitaryLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoIsUnitaryLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoNumGeosLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoNumGeosLogicalFunction.cpp new file mode 100644 index 0000000000..f6c602d5ed --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoNumGeosLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoNumGeosLogicalFunction::GeoNumGeosLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeoNumGeosLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoNumGeosLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoNumGeosLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoNumGeosLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoNumGeosLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoNumGeosLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoNumGeosLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoNumGeosLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoNumGeosLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoNumGeosLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoNumGeosLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoNumGeosLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoNumGeosLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoNumPointsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoNumPointsLogicalFunction.cpp new file mode 100644 index 0000000000..2a7abd9fef --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoNumPointsLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoNumPointsLogicalFunction::GeoNumPointsLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeoNumPointsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoNumPointsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoNumPointsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoNumPointsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoNumPointsLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoNumPointsLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoNumPointsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoNumPointsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoNumPointsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoNumPointsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoNumPointsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoNumPointsLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoNumPointsLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoPointsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoPointsLogicalFunction.cpp new file mode 100644 index 0000000000..9236e96371 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoPointsLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoPointsLogicalFunction::GeoPointsLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeoPointsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoPointsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoPointsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoPointsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoPointsLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoPointsLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoPointsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoPointsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoPointsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoPointsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoPointsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoPointsLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoPointsLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoReverseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoReverseLogicalFunction.cpp new file mode 100644 index 0000000000..b65b756b17 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoReverseLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoReverseLogicalFunction::GeoReverseLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeoReverseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoReverseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoReverseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoReverseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoReverseLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoReverseLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoReverseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoReverseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoReverseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoReverseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoReverseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoReverseLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoReverseLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoRoundLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoRoundLogicalFunction.cpp new file mode 100644 index 0000000000..7c292ca5e1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoRoundLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoRoundLogicalFunction::GeoRoundLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoRoundLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoRoundLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoRoundLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoRoundLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoRoundLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoRoundLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoRoundLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoRoundLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoRoundLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoRoundLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoRoundLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoRoundLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoRoundLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoSameLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoSameLogicalFunction.cpp new file mode 100644 index 0000000000..a73c9f5bbb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoSameLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoSameLogicalFunction::GeoSameLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoSameLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoSameLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoSameLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoSameLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoSameLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoSameLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoSameLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoSameLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoSameLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoSameLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoSameLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoSameLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoSameLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoSetSridLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoSetSridLogicalFunction.cpp new file mode 100644 index 0000000000..4254bc8c7d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoSetSridLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoSetSridLogicalFunction::GeoSetSridLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoSetSridLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoSetSridLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoSetSridLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoSetSridLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoSetSridLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoSetSridLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoSetSridLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoSetSridLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoSetSridLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoSetSridLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoSetSridLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoSetSridLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoSetSridLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoSridLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoSridLogicalFunction.cpp new file mode 100644 index 0000000000..9e8bc01525 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoSridLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoSridLogicalFunction::GeoSridLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeoSridLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoSridLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoSridLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoSridLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeoSridLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoSridLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoSridLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoSridLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoSridLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoSridLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoSridLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeoSridLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeoSridLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeoTransformLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeoTransformLogicalFunction.cpp new file mode 100644 index 0000000000..0e87cb75d9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeoTransformLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeoTransformLogicalFunction::GeoTransformLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeoTransformLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeoTransformLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeoTransformLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeoTransformLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeoTransformLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeoTransformLogicalFunction::getType() const +{ + return NAME; +} + +bool GeoTransformLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeoTransformLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeoTransformLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeoTransformLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeoTransformLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeoTransformLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeoTransformLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogAreaLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogAreaLogicalFunction.cpp new file mode 100644 index 0000000000..d42e6cfcc8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogAreaLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogAreaLogicalFunction::GeogAreaLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeogAreaLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogAreaLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogAreaLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogAreaLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeogAreaLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogAreaLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogAreaLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogAreaLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogAreaLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogAreaLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogAreaLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeogAreaLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeogAreaLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogCentroidLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogCentroidLogicalFunction.cpp new file mode 100644 index 0000000000..b088f2d239 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogCentroidLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogCentroidLogicalFunction::GeogCentroidLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeogCentroidLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogCentroidLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogCentroidLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogCentroidLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeogCentroidLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogCentroidLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogCentroidLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogCentroidLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogCentroidLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogCentroidLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogCentroidLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeogCentroidLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeogCentroidLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogDistanceLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogDistanceLogicalFunction.cpp new file mode 100644 index 0000000000..7957786079 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogDistanceLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogDistanceLogicalFunction::GeogDistanceLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeogDistanceLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogDistanceLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogDistanceLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogDistanceLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeogDistanceLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogDistanceLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogDistanceLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogDistanceLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogDistanceLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogDistanceLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogDistanceLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeogDistanceLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeogDistanceLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogDwithinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogDwithinLogicalFunction.cpp new file mode 100644 index 0000000000..9ac8969733 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogDwithinLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogDwithinLogicalFunction::GeogDwithinLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType GeogDwithinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogDwithinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogDwithinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogDwithinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeogDwithinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogDwithinLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogDwithinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogDwithinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogDwithinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogDwithinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogDwithinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeogDwithinLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeogDwithinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogIntersectsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogIntersectsLogicalFunction.cpp new file mode 100644 index 0000000000..014ebc494e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogIntersectsLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogIntersectsLogicalFunction::GeogIntersectsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeogIntersectsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogIntersectsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogIntersectsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogIntersectsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeogIntersectsLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogIntersectsLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogIntersectsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogIntersectsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogIntersectsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogIntersectsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogIntersectsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeogIntersectsLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeogIntersectsLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogLengthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogLengthLogicalFunction.cpp new file mode 100644 index 0000000000..5cadfdbac6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogLengthLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogLengthLogicalFunction::GeogLengthLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeogLengthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogLengthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogLengthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogLengthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeogLengthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogLengthLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogLengthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogLengthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogLengthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogLengthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogLengthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeogLengthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeogLengthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogPerimeterLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogPerimeterLogicalFunction.cpp new file mode 100644 index 0000000000..c0d661ea85 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogPerimeterLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogPerimeterLogicalFunction::GeogPerimeterLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeogPerimeterLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogPerimeterLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogPerimeterLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogPerimeterLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeogPerimeterLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogPerimeterLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogPerimeterLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogPerimeterLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogPerimeterLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogPerimeterLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogPerimeterLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeogPerimeterLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeogPerimeterLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogPointMake2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogPointMake2dLogicalFunction.cpp new file mode 100644 index 0000000000..95502c3580 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogPointMake2dLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogPointMake2dLogicalFunction::GeogPointMake2dLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(srid)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); +} + +DataType GeogPointMake2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogPointMake2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogPointMake2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogPointMake2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeogPointMake2dLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogPointMake2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogPointMake2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogPointMake2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogPointMake2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogPointMake2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogPointMake2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeogPointMake2dLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeogPointMake2dLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogPointMake3dzLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogPointMake3dzLogicalFunction.cpp new file mode 100644 index 0000000000..9a886ce82c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogPointMake3dzLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogPointMake3dzLogicalFunction::GeogPointMake3dzLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y, + LogicalFunction z) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(4); + parameters.push_back(std::move(srid)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(z)); +} + +DataType GeogPointMake3dzLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogPointMake3dzLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogPointMake3dzLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogPointMake3dzLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "GeogPointMake3dzLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogPointMake3dzLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogPointMake3dzLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogPointMake3dzLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogPointMake3dzLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogPointMake3dzLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogPointMake3dzLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "GeogPointMake3dzLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return GeogPointMake3dzLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeogToGeomLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeogToGeomLogicalFunction.cpp new file mode 100644 index 0000000000..cebb7bb517 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeogToGeomLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeogToGeomLogicalFunction::GeogToGeomLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeogToGeomLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeogToGeomLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeogToGeomLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeogToGeomLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeogToGeomLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeogToGeomLogicalFunction::getType() const +{ + return NAME; +} + +bool GeogToGeomLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeogToGeomLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeogToGeomLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeogToGeomLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeogToGeomLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeogToGeomLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeogToGeomLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomAzimuthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomAzimuthLogicalFunction.cpp new file mode 100644 index 0000000000..ed3e3e00d7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomAzimuthLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomAzimuthLogicalFunction::GeomAzimuthLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomAzimuthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomAzimuthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomAzimuthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomAzimuthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomAzimuthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomAzimuthLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomAzimuthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomAzimuthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomAzimuthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomAzimuthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomAzimuthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomAzimuthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomAzimuthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomBoundaryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomBoundaryLogicalFunction.cpp new file mode 100644 index 0000000000..a109b50bb8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomBoundaryLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomBoundaryLogicalFunction::GeomBoundaryLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomBoundaryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomBoundaryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomBoundaryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomBoundaryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomBoundaryLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomBoundaryLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomBoundaryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomBoundaryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomBoundaryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomBoundaryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomBoundaryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomBoundaryLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomBoundaryLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomCentroidLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomCentroidLogicalFunction.cpp new file mode 100644 index 0000000000..ca20ba17b6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomCentroidLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomCentroidLogicalFunction::GeomCentroidLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomCentroidLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomCentroidLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomCentroidLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomCentroidLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomCentroidLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomCentroidLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomCentroidLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomCentroidLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomCentroidLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomCentroidLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomCentroidLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomCentroidLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomCentroidLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomContainsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomContainsLogicalFunction.cpp new file mode 100644 index 0000000000..003bd0275c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomContainsLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomContainsLogicalFunction::GeomContainsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomContainsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomContainsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomContainsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomContainsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomContainsLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomContainsLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomContainsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomContainsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomContainsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomContainsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomContainsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomContainsLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomContainsLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomConvexHullLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomConvexHullLogicalFunction.cpp new file mode 100644 index 0000000000..cb203382d0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomConvexHullLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomConvexHullLogicalFunction::GeomConvexHullLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomConvexHullLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomConvexHullLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomConvexHullLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomConvexHullLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomConvexHullLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomConvexHullLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomConvexHullLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomConvexHullLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomConvexHullLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomConvexHullLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomConvexHullLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomConvexHullLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomConvexHullLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomCoversLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomCoversLogicalFunction.cpp new file mode 100644 index 0000000000..adcbf8371d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomCoversLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomCoversLogicalFunction::GeomCoversLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomCoversLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomCoversLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomCoversLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomCoversLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomCoversLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomCoversLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomCoversLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomCoversLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomCoversLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomCoversLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomCoversLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomCoversLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomCoversLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDifference2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDifference2dLogicalFunction.cpp new file mode 100644 index 0000000000..2a2582f919 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDifference2dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDifference2dLogicalFunction::GeomDifference2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomDifference2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDifference2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDifference2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDifference2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomDifference2dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDifference2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDifference2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDifference2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDifference2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDifference2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDifference2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomDifference2dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomDifference2dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDisjoint2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDisjoint2dLogicalFunction.cpp new file mode 100644 index 0000000000..b9d684edc5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDisjoint2dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDisjoint2dLogicalFunction::GeomDisjoint2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomDisjoint2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDisjoint2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDisjoint2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDisjoint2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomDisjoint2dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDisjoint2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDisjoint2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDisjoint2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDisjoint2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDisjoint2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDisjoint2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomDisjoint2dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomDisjoint2dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDistance2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDistance2dLogicalFunction.cpp new file mode 100644 index 0000000000..8f89e4d993 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDistance2dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDistance2dLogicalFunction::GeomDistance2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomDistance2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDistance2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDistance2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDistance2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomDistance2dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDistance2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDistance2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDistance2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDistance2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDistance2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDistance2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomDistance2dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomDistance2dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDistance3dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDistance3dLogicalFunction.cpp new file mode 100644 index 0000000000..90643c3853 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDistance3dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDistance3dLogicalFunction::GeomDistance3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomDistance3dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDistance3dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDistance3dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDistance3dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomDistance3dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDistance3dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDistance3dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDistance3dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDistance3dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDistance3dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDistance3dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomDistance3dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomDistance3dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDwithin2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDwithin2dLogicalFunction.cpp new file mode 100644 index 0000000000..516a3b6503 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDwithin2dLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDwithin2dLogicalFunction::GeomDwithin2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType GeomDwithin2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDwithin2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDwithin2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDwithin2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeomDwithin2dLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDwithin2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDwithin2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDwithin2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDwithin2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDwithin2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDwithin2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeomDwithin2dLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeomDwithin2dLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDwithin3dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDwithin3dLogicalFunction.cpp new file mode 100644 index 0000000000..0f5274f499 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDwithin3dLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDwithin3dLogicalFunction::GeomDwithin3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType GeomDwithin3dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDwithin3dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDwithin3dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDwithin3dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeomDwithin3dLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDwithin3dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDwithin3dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDwithin3dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDwithin3dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDwithin3dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDwithin3dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeomDwithin3dLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeomDwithin3dLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomDwithinLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomDwithinLogicalFunction.cpp new file mode 100644 index 0000000000..34f779ea5c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomDwithinLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomDwithinLogicalFunction::GeomDwithinLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType GeomDwithinLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomDwithinLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomDwithinLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomDwithinLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeomDwithinLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomDwithinLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomDwithinLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomDwithinLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomDwithinLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomDwithinLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomDwithinLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeomDwithinLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeomDwithinLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomIntersection2dCollLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomIntersection2dCollLogicalFunction.cpp new file mode 100644 index 0000000000..d177ccd3f1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomIntersection2dCollLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomIntersection2dCollLogicalFunction::GeomIntersection2dCollLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomIntersection2dCollLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomIntersection2dCollLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomIntersection2dCollLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomIntersection2dCollLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomIntersection2dCollLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomIntersection2dCollLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomIntersection2dCollLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomIntersection2dCollLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomIntersection2dCollLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomIntersection2dCollLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomIntersection2dCollLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomIntersection2dCollLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomIntersection2dCollLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomIntersection2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomIntersection2dLogicalFunction.cpp new file mode 100644 index 0000000000..87f023a6c3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomIntersection2dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomIntersection2dLogicalFunction::GeomIntersection2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomIntersection2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomIntersection2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomIntersection2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomIntersection2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomIntersection2dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomIntersection2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomIntersection2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomIntersection2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomIntersection2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomIntersection2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomIntersection2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomIntersection2dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomIntersection2dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomIntersects2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomIntersects2dLogicalFunction.cpp new file mode 100644 index 0000000000..3f211ca58c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomIntersects2dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomIntersects2dLogicalFunction::GeomIntersects2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomIntersects2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomIntersects2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomIntersects2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomIntersects2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomIntersects2dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomIntersects2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomIntersects2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomIntersects2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomIntersects2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomIntersects2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomIntersects2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomIntersects2dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomIntersects2dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomIntersects3dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomIntersects3dLogicalFunction.cpp new file mode 100644 index 0000000000..e9ea6d16ae --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomIntersects3dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomIntersects3dLogicalFunction::GeomIntersects3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomIntersects3dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomIntersects3dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomIntersects3dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomIntersects3dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomIntersects3dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomIntersects3dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomIntersects3dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomIntersects3dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomIntersects3dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomIntersects3dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomIntersects3dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomIntersects3dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomIntersects3dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomIntersectsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomIntersectsLogicalFunction.cpp new file mode 100644 index 0000000000..905f5a0c0f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomIntersectsLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomIntersectsLogicalFunction::GeomIntersectsLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomIntersectsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomIntersectsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomIntersectsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomIntersectsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomIntersectsLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomIntersectsLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomIntersectsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomIntersectsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomIntersectsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomIntersectsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomIntersectsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomIntersectsLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomIntersectsLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomIsEmptyLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomIsEmptyLogicalFunction.cpp new file mode 100644 index 0000000000..3d4697f4cf --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomIsEmptyLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomIsEmptyLogicalFunction::GeomIsEmptyLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomIsEmptyLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomIsEmptyLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomIsEmptyLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomIsEmptyLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomIsEmptyLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomIsEmptyLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomIsEmptyLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomIsEmptyLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomIsEmptyLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomIsEmptyLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomIsEmptyLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomIsEmptyLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomIsEmptyLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomLengthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomLengthLogicalFunction.cpp new file mode 100644 index 0000000000..17fa8e548a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomLengthLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomLengthLogicalFunction::GeomLengthLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomLengthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomLengthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomLengthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomLengthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomLengthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomLengthLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomLengthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomLengthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomLengthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomLengthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomLengthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomLengthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomLengthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomPerimeterLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomPerimeterLogicalFunction.cpp new file mode 100644 index 0000000000..3f9368ec10 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomPerimeterLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomPerimeterLogicalFunction::GeomPerimeterLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomPerimeterLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomPerimeterLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomPerimeterLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomPerimeterLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomPerimeterLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomPerimeterLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomPerimeterLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomPerimeterLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomPerimeterLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomPerimeterLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomPerimeterLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomPerimeterLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomPerimeterLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomPointMake2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomPointMake2dLogicalFunction.cpp new file mode 100644 index 0000000000..d39549009d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomPointMake2dLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomPointMake2dLogicalFunction::GeomPointMake2dLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(srid)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); +} + +DataType GeomPointMake2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomPointMake2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomPointMake2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomPointMake2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "GeomPointMake2dLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomPointMake2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomPointMake2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomPointMake2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomPointMake2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomPointMake2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomPointMake2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "GeomPointMake2dLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return GeomPointMake2dLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomPointMake3dzLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomPointMake3dzLogicalFunction.cpp new file mode 100644 index 0000000000..5c449ce354 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomPointMake3dzLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomPointMake3dzLogicalFunction::GeomPointMake3dzLogicalFunction(LogicalFunction srid, + LogicalFunction x, + LogicalFunction y, + LogicalFunction z) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(4); + parameters.push_back(std::move(srid)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(z)); +} + +DataType GeomPointMake3dzLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomPointMake3dzLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomPointMake3dzLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomPointMake3dzLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "GeomPointMake3dzLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomPointMake3dzLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomPointMake3dzLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomPointMake3dzLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomPointMake3dzLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomPointMake3dzLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomPointMake3dzLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "GeomPointMake3dzLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return GeomPointMake3dzLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomShortestline2dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomShortestline2dLogicalFunction.cpp new file mode 100644 index 0000000000..49f1e951ca --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomShortestline2dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomShortestline2dLogicalFunction::GeomShortestline2dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomShortestline2dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomShortestline2dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomShortestline2dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomShortestline2dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomShortestline2dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomShortestline2dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomShortestline2dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomShortestline2dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomShortestline2dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomShortestline2dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomShortestline2dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomShortestline2dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomShortestline2dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomShortestline3dLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomShortestline3dLogicalFunction.cpp new file mode 100644 index 0000000000..ff511fe28f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomShortestline3dLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomShortestline3dLogicalFunction::GeomShortestline3dLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomShortestline3dLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomShortestline3dLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomShortestline3dLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomShortestline3dLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomShortestline3dLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomShortestline3dLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomShortestline3dLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomShortestline3dLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomShortestline3dLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomShortestline3dLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomShortestline3dLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomShortestline3dLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomShortestline3dLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomToGeogLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomToGeogLogicalFunction.cpp new file mode 100644 index 0000000000..15dcc8f283 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomToGeogLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomToGeogLogicalFunction::GeomToGeogLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomToGeogLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomToGeogLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomToGeogLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomToGeogLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomToGeogLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomToGeogLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomToGeogLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomToGeogLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomToGeogLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomToGeogLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomToGeogLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomToGeogLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomToGeogLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomTouchesLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomTouchesLogicalFunction.cpp new file mode 100644 index 0000000000..d1c43e632c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomTouchesLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomTouchesLogicalFunction::GeomTouchesLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType GeomTouchesLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomTouchesLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomTouchesLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomTouchesLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "GeomTouchesLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomTouchesLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomTouchesLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomTouchesLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomTouchesLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomTouchesLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomTouchesLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "GeomTouchesLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return GeomTouchesLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/GeomUnaryUnionLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/GeomUnaryUnionLogicalFunction.cpp new file mode 100644 index 0000000000..991d558ce6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/GeomUnaryUnionLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +GeomUnaryUnionLogicalFunction::GeomUnaryUnionLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType GeomUnaryUnionLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction GeomUnaryUnionLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector GeomUnaryUnionLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction GeomUnaryUnionLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "GeomUnaryUnionLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view GeomUnaryUnionLogicalFunction::getType() const +{ + return NAME; +} + +bool GeomUnaryUnionLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string GeomUnaryUnionLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction GeomUnaryUnionLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction GeomUnaryUnionLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterGeomUnaryUnionLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "GeomUnaryUnionLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return GeomUnaryUnionLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexCmpLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexCmpLogicalFunction.cpp new file mode 100644 index 0000000000..13476ce147 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexCmpLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexCmpLogicalFunction::H3indexCmpLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexCmpLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexCmpLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexCmpLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexCmpLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexCmpLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexCmpLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexCmpLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexCmpLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexCmpLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexCmpLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexCmpLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexCmpLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexCmpLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexEqLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexEqLogicalFunction.cpp new file mode 100644 index 0000000000..13ea6ec352 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexEqLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexEqLogicalFunction::H3indexEqLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexEqLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexEqLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexEqLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexEqLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexEqLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexEqLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexEqLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexEqLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexEqLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexEqLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexEqLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexEqLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexEqLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexGeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexGeLogicalFunction.cpp new file mode 100644 index 0000000000..3c764f4070 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexGeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexGeLogicalFunction::H3indexGeLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexGeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexGeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexGeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexGeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexGeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexGeLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexGeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexGeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexGeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexGeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexGeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexGeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexGeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexGtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexGtLogicalFunction.cpp new file mode 100644 index 0000000000..2137ab5f90 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexGtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexGtLogicalFunction::H3indexGtLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexGtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexGtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexGtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexGtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexGtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexGtLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexGtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexGtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexGtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexGtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexGtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexGtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexGtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexLeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexLeLogicalFunction.cpp new file mode 100644 index 0000000000..ce05e836ca --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexLeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexLeLogicalFunction::H3indexLeLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexLeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexLeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexLeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexLeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexLeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexLeLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexLeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexLeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexLeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexLeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexLeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexLeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexLeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexLtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexLtLogicalFunction.cpp new file mode 100644 index 0000000000..a89dc7112e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexLtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexLtLogicalFunction::H3indexLtLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexLtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexLtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexLtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexLtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexLtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexLtLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexLtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexLtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexLtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexLtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexLtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexLtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexLtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexNeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexNeLogicalFunction.cpp new file mode 100644 index 0000000000..e66a49167f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexNeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexNeLogicalFunction::H3indexNeLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType H3indexNeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexNeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexNeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexNeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "H3indexNeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexNeLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexNeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexNeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexNeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexNeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexNeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "H3indexNeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return H3indexNeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/H3indexOutLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/H3indexOutLogicalFunction.cpp new file mode 100644 index 0000000000..d36a89ca7e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/H3indexOutLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +H3indexOutLogicalFunction::H3indexOutLogicalFunction(LogicalFunction cell) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(cell)); +} + +DataType H3indexOutLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction H3indexOutLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector H3indexOutLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction H3indexOutLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "H3indexOutLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view H3indexOutLogicalFunction::getType() const +{ + return NAME; +} + +bool H3indexOutLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string H3indexOutLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction H3indexOutLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction H3indexOutLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterH3indexOutLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "H3indexOutLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return H3indexOutLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/IntspanLowerIncLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntspanLowerIncLogicalFunction.cpp new file mode 100644 index 0000000000..522314f58f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/IntspanLowerIncLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +IntspanLowerIncLogicalFunction::IntspanLowerIncLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType IntspanLowerIncLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction IntspanLowerIncLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector IntspanLowerIncLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction IntspanLowerIncLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "IntspanLowerIncLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view IntspanLowerIncLogicalFunction::getType() const +{ + return NAME; +} + +bool IntspanLowerIncLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string IntspanLowerIncLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction IntspanLowerIncLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction IntspanLowerIncLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntspanLowerIncLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "IntspanLowerIncLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return IntspanLowerIncLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/IntspanLowerLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntspanLowerLogicalFunction.cpp new file mode 100644 index 0000000000..a4a2a5fb89 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/IntspanLowerLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +IntspanLowerLogicalFunction::IntspanLowerLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType IntspanLowerLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction IntspanLowerLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector IntspanLowerLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction IntspanLowerLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "IntspanLowerLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view IntspanLowerLogicalFunction::getType() const +{ + return NAME; +} + +bool IntspanLowerLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string IntspanLowerLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction IntspanLowerLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction IntspanLowerLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntspanLowerLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "IntspanLowerLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return IntspanLowerLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/IntspanUpperIncLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntspanUpperIncLogicalFunction.cpp new file mode 100644 index 0000000000..baf855a4ff --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/IntspanUpperIncLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +IntspanUpperIncLogicalFunction::IntspanUpperIncLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType IntspanUpperIncLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction IntspanUpperIncLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector IntspanUpperIncLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction IntspanUpperIncLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "IntspanUpperIncLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view IntspanUpperIncLogicalFunction::getType() const +{ + return NAME; +} + +bool IntspanUpperIncLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string IntspanUpperIncLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction IntspanUpperIncLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction IntspanUpperIncLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntspanUpperIncLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "IntspanUpperIncLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return IntspanUpperIncLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/IntspanUpperLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntspanUpperLogicalFunction.cpp new file mode 100644 index 0000000000..e56928c1dd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/IntspanUpperLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +IntspanUpperLogicalFunction::IntspanUpperLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType IntspanUpperLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction IntspanUpperLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector IntspanUpperLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction IntspanUpperLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "IntspanUpperLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view IntspanUpperLogicalFunction::getType() const +{ + return NAME; +} + +bool IntspanUpperLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string IntspanUpperLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction IntspanUpperLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction IntspanUpperLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntspanUpperLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "IntspanUpperLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return IntspanUpperLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/IntspanWidthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/IntspanWidthLogicalFunction.cpp new file mode 100644 index 0000000000..a74c99238a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/IntspanWidthLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +IntspanWidthLogicalFunction::IntspanWidthLogicalFunction(LogicalFunction sp) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(sp)); +} + +DataType IntspanWidthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction IntspanWidthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector IntspanWidthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction IntspanWidthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "IntspanWidthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view IntspanWidthLogicalFunction::getType() const +{ + return NAME; +} + +bool IntspanWidthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string IntspanWidthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction IntspanWidthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction IntspanWidthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterIntspanWidthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "IntspanWidthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return IntspanWidthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbArrayElementTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbArrayElementTextLogicalFunction.cpp new file mode 100644 index 0000000000..ea4bce5f19 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbArrayElementTextLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbArrayElementTextLogicalFunction::JsonbArrayElementTextLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbArrayElementTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbArrayElementTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbArrayElementTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbArrayElementTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbArrayElementTextLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbArrayElementTextLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbArrayElementTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbArrayElementTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbArrayElementTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbArrayElementTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbArrayElementTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbArrayElementTextLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbArrayElementTextLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbArrayLengthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbArrayLengthLogicalFunction.cpp new file mode 100644 index 0000000000..0bc8d70405 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbArrayLengthLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbArrayLengthLogicalFunction::JsonbArrayLengthLogicalFunction(LogicalFunction jb) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(jb)); +} + +DataType JsonbArrayLengthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbArrayLengthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbArrayLengthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbArrayLengthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "JsonbArrayLengthLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbArrayLengthLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbArrayLengthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbArrayLengthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbArrayLengthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbArrayLengthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbArrayLengthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "JsonbArrayLengthLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return JsonbArrayLengthLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbCmpLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbCmpLogicalFunction.cpp new file mode 100644 index 0000000000..713b15995b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbCmpLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbCmpLogicalFunction::JsonbCmpLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbCmpLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbCmpLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbCmpLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbCmpLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbCmpLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbCmpLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbCmpLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbCmpLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbCmpLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbCmpLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbCmpLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbCmpLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbCmpLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbContainedLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbContainedLogicalFunction.cpp new file mode 100644 index 0000000000..1ad143498b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbContainedLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbContainedLogicalFunction::JsonbContainedLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbContainedLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbContainedLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbContainedLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbContainedLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbContainedLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbContainedLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbContainedLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbContainedLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbContainedLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbContainedLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbContainedLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbContainedLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbContainedLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbContainsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbContainsLogicalFunction.cpp new file mode 100644 index 0000000000..000ca0697c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbContainsLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbContainsLogicalFunction::JsonbContainsLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbContainsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbContainsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbContainsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbContainsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbContainsLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbContainsLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbContainsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbContainsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbContainsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbContainsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbContainsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbContainsLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbContainsLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbEqLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbEqLogicalFunction.cpp new file mode 100644 index 0000000000..9833cf8c8e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbEqLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbEqLogicalFunction::JsonbEqLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbEqLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbEqLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbEqLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbEqLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbEqLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbEqLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbEqLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbEqLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbEqLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbEqLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbEqLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbEqLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbEqLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbExistsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbExistsLogicalFunction.cpp new file mode 100644 index 0000000000..5b32ef83e4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbExistsLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbExistsLogicalFunction::JsonbExistsLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbExistsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbExistsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbExistsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbExistsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbExistsLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbExistsLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbExistsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbExistsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbExistsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbExistsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbExistsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbExistsLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbExistsLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbGeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbGeLogicalFunction.cpp new file mode 100644 index 0000000000..5b209580aa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbGeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbGeLogicalFunction::JsonbGeLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbGeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbGeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbGeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbGeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbGeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbGeLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbGeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbGeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbGeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbGeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbGeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbGeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbGeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbGtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbGtLogicalFunction.cpp new file mode 100644 index 0000000000..e183f0de19 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbGtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbGtLogicalFunction::JsonbGtLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbGtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbGtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbGtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbGtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbGtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbGtLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbGtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbGtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbGtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbGtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbGtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbGtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbGtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbLeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbLeLogicalFunction.cpp new file mode 100644 index 0000000000..2279ca5103 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbLeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbLeLogicalFunction::JsonbLeLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbLeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbLeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbLeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbLeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbLeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbLeLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbLeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbLeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbLeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbLeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbLeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbLeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbLeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbLtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbLtLogicalFunction.cpp new file mode 100644 index 0000000000..346db546fa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbLtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbLtLogicalFunction::JsonbLtLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbLtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbLtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbLtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbLtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbLtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbLtLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbLtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbLtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbLtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbLtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbLtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbLtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbLtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbNeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbNeLogicalFunction.cpp new file mode 100644 index 0000000000..9e4d098e22 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbNeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbNeLogicalFunction::JsonbNeLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbNeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbNeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbNeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbNeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbNeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbNeLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbNeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbNeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbNeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbNeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbNeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbNeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbNeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbObjectFieldTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbObjectFieldTextLogicalFunction.cpp new file mode 100644 index 0000000000..ae77912c33 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbObjectFieldTextLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbObjectFieldTextLogicalFunction::JsonbObjectFieldTextLogicalFunction(LogicalFunction jb, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(jb)); + parameters.push_back(std::move(arg0)); +} + +DataType JsonbObjectFieldTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbObjectFieldTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbObjectFieldTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbObjectFieldTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "JsonbObjectFieldTextLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbObjectFieldTextLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbObjectFieldTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbObjectFieldTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbObjectFieldTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbObjectFieldTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbObjectFieldTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "JsonbObjectFieldTextLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return JsonbObjectFieldTextLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbPrettyLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbPrettyLogicalFunction.cpp new file mode 100644 index 0000000000..bac2f957e4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbPrettyLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbPrettyLogicalFunction::JsonbPrettyLogicalFunction(LogicalFunction jb) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(jb)); +} + +DataType JsonbPrettyLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbPrettyLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbPrettyLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbPrettyLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "JsonbPrettyLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbPrettyLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbPrettyLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbPrettyLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbPrettyLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbPrettyLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbPrettyLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "JsonbPrettyLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return JsonbPrettyLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/JsonbToCstringLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/JsonbToCstringLogicalFunction.cpp new file mode 100644 index 0000000000..01c8445550 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/JsonbToCstringLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +JsonbToCstringLogicalFunction::JsonbToCstringLogicalFunction(LogicalFunction jb) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(jb)); +} + +DataType JsonbToCstringLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction JsonbToCstringLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector JsonbToCstringLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction JsonbToCstringLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "JsonbToCstringLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view JsonbToCstringLogicalFunction::getType() const +{ + return NAME; +} + +bool JsonbToCstringLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string JsonbToCstringLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction JsonbToCstringLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction JsonbToCstringLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterJsonbToCstringLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "JsonbToCstringLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return JsonbToCstringLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..3897dad876 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftStboxStboxLogicalFunction::LeftStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType LeftStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "LeftStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "LeftStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return LeftStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..5169a926e4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftStboxTspatialLogicalFunction::LeftStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType LeftStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "LeftStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "LeftStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return LeftStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..3c7c9b4969 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftTboxTnumberLogicalFunction::LeftTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType LeftTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "LeftTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "LeftTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return LeftTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..dde8aa7b5f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftTnumberTboxLogicalFunction::LeftTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType LeftTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "LeftTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "LeftTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return LeftTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..9eef214244 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftTnumberTnumberLogicalFunction::LeftTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType LeftTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "LeftTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "LeftTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return LeftTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..0e4bebab39 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftTspatialStboxLogicalFunction::LeftTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType LeftTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "LeftTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "LeftTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return LeftTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LeftTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LeftTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..2d5c977f7a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LeftTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LeftTspatialTspatialLogicalFunction::LeftTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType LeftTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LeftTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LeftTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LeftTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "LeftTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LeftTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool LeftTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LeftTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LeftTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LeftTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLeftTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "LeftTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return LeftTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LineInterpolatePointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LineInterpolatePointLogicalFunction.cpp new file mode 100644 index 0000000000..8adae219bd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LineInterpolatePointLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LineInterpolatePointLogicalFunction::LineInterpolatePointLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType LineInterpolatePointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LineInterpolatePointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LineInterpolatePointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LineInterpolatePointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "LineInterpolatePointLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LineInterpolatePointLogicalFunction::getType() const +{ + return NAME; +} + +bool LineInterpolatePointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LineInterpolatePointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LineInterpolatePointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LineInterpolatePointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLineInterpolatePointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "LineInterpolatePointLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return LineInterpolatePointLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LineLocatePointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LineLocatePointLogicalFunction.cpp new file mode 100644 index 0000000000..cbcb8907e1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LineLocatePointLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LineLocatePointLogicalFunction::LineLocatePointLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType LineLocatePointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LineLocatePointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LineLocatePointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LineLocatePointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "LineLocatePointLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LineLocatePointLogicalFunction::getType() const +{ + return NAME; +} + +bool LineLocatePointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LineLocatePointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LineLocatePointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LineLocatePointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLineLocatePointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "LineLocatePointLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return LineLocatePointLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LineNumpointsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LineNumpointsLogicalFunction.cpp new file mode 100644 index 0000000000..d365f979f4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LineNumpointsLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LineNumpointsLogicalFunction::LineNumpointsLogicalFunction(LogicalFunction wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(wkt)); +} + +DataType LineNumpointsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LineNumpointsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LineNumpointsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LineNumpointsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "LineNumpointsLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LineNumpointsLogicalFunction::getType() const +{ + return NAME; +} + +bool LineNumpointsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LineNumpointsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LineNumpointsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LineNumpointsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLineNumpointsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "LineNumpointsLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return LineNumpointsLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LinePointNLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LinePointNLogicalFunction.cpp new file mode 100644 index 0000000000..113f036410 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LinePointNLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LinePointNLogicalFunction::LinePointNLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); +} + +DataType LinePointNLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LinePointNLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LinePointNLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LinePointNLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "LinePointNLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LinePointNLogicalFunction::getType() const +{ + return NAME; +} + +bool LinePointNLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LinePointNLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LinePointNLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LinePointNLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLinePointNLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "LinePointNLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return LinePointNLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/LineSubstringLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/LineSubstringLogicalFunction.cpp new file mode 100644 index 0000000000..2ec9e2bea3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/LineSubstringLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +LineSubstringLogicalFunction::LineSubstringLogicalFunction(LogicalFunction wkt, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(wkt)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType LineSubstringLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction LineSubstringLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector LineSubstringLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction LineSubstringLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "LineSubstringLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view LineSubstringLogicalFunction::getType() const +{ + return NAME; +} + +bool LineSubstringLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string LineSubstringLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction LineSubstringLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction LineSubstringLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterLineSubstringLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "LineSubstringLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return LineSubstringLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..044093d6ac --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MindistanceTcbufferTcbufferLogicalFunction::MindistanceTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(9); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType MindistanceTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MindistanceTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MindistanceTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MindistanceTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "MindistanceTcbufferTcbufferLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MindistanceTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool MindistanceTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MindistanceTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MindistanceTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MindistanceTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMindistanceTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "MindistanceTcbufferTcbufferLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return MindistanceTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..59e436d5f5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulBigintTbigintLogicalFunction::MulBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType MulBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "MulBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool MulBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "MulBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return MulBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..c4e341db57 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulFloatTfloatLogicalFunction::MulFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType MulFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "MulFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool MulFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "MulFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return MulFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..240c98e62f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulIntTintLogicalFunction::MulIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType MulIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "MulIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool MulIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "MulIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return MulIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..a342ef8f47 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulTbigintBigintLogicalFunction::MulTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType MulTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "MulTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool MulTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "MulTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return MulTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..823c1f66b3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulTfloatFloatLogicalFunction::MulTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType MulTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "MulTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool MulTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "MulTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return MulTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..51629ab3e6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulTintIntLogicalFunction::MulTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType MulTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "MulTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool MulTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "MulTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return MulTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MulTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MulTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..21bed7eb8f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MulTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MulTnumberTnumberLogicalFunction::MulTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType MulTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MulTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MulTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MulTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "MulTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MulTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool MulTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MulTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MulTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MulTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMulTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "MulTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return MulTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/MultTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/MultTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..9fcdf240a8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/MultTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +MultTnumberTnumberLogicalFunction::MultTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType MultTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction MultTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector MultTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction MultTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "MultTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view MultTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool MultTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string MultTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction MultTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction MultTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterMultTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "MultTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return MultTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..79b246f61b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadStboxStboxLogicalFunction::NadStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType NadStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "NadStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "NadStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return NadStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTcbufferGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTcbufferGeoLogicalFunction.cpp new file mode 100644 index 0000000000..c3e3b62f5f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTcbufferGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTcbufferGeoLogicalFunction::NadTcbufferGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType NadTcbufferGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTcbufferGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTcbufferGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTcbufferGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "NadTcbufferGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTcbufferGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTcbufferGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTcbufferGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTcbufferGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTcbufferGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTcbufferGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "NadTcbufferGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return NadTcbufferGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTcbufferStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTcbufferStboxLogicalFunction.cpp new file mode 100644 index 0000000000..42189b329b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTcbufferStboxLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTcbufferStboxLogicalFunction::NadTcbufferStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTcbufferStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTcbufferStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTcbufferStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTcbufferStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "NadTcbufferStboxLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTcbufferStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTcbufferStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTcbufferStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTcbufferStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTcbufferStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTcbufferStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "NadTcbufferStboxLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return NadTcbufferStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..02cb68de12 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTcbufferTcbufferLogicalFunction::NadTcbufferTcbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType NadTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "NadTcbufferTcbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "NadTcbufferTcbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return NadTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTfloatTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTfloatTboxLogicalFunction.cpp new file mode 100644 index 0000000000..080e5eca70 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTfloatTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTfloatTboxLogicalFunction::NadTfloatTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTfloatTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTfloatTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTfloatTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTfloatTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "NadTfloatTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTfloatTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTfloatTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTfloatTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTfloatTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTfloatTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTfloatTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "NadTfloatTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return NadTfloatTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTgeoGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTgeoGeoLogicalFunction.cpp new file mode 100644 index 0000000000..a7f622f340 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTgeoGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTgeoGeoLogicalFunction::NadTgeoGeoLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType NadTgeoGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTgeoGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTgeoGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTgeoGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "NadTgeoGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTgeoGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTgeoGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTgeoGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTgeoGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTgeoGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTgeoGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "NadTgeoGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return NadTgeoGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTgeoStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTgeoStboxLogicalFunction.cpp new file mode 100644 index 0000000000..e71403f13b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTgeoStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTgeoStboxLogicalFunction::NadTgeoStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTgeoStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTgeoStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTgeoStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTgeoStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "NadTgeoStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTgeoStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTgeoStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTgeoStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTgeoStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTgeoStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTgeoStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "NadTgeoStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return NadTgeoStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..74f796d654 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTgeoTgeoLogicalFunction::NadTgeoTgeoLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType NadTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "NadTgeoTgeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "NadTgeoTgeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return NadTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTintTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTintTboxLogicalFunction.cpp new file mode 100644 index 0000000000..194326ca4d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTintTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTintTboxLogicalFunction::NadTintTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTintTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTintTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTintTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTintTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "NadTintTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTintTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTintTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTintTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTintTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTintTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTintTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "NadTintTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return NadTintTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTnpointGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTnpointGeoLogicalFunction.cpp new file mode 100644 index 0000000000..06a925b27e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTnpointGeoLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTnpointGeoLogicalFunction::NadTnpointGeoLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTnpointGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTnpointGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTnpointGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTnpointGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "NadTnpointGeoLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTnpointGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTnpointGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTnpointGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTnpointGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTnpointGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTnpointGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "NadTnpointGeoLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return NadTnpointGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTnpointNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTnpointNpointLogicalFunction.cpp new file mode 100644 index 0000000000..e4dea05c39 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTnpointNpointLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTnpointNpointLogicalFunction::NadTnpointNpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); +} + +DataType NadTnpointNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTnpointNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTnpointNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTnpointNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "NadTnpointNpointLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTnpointNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTnpointNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTnpointNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTnpointNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTnpointNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTnpointNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "NadTnpointNpointLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return NadTnpointNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTnpointStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTnpointStboxLogicalFunction.cpp new file mode 100644 index 0000000000..a99f1c1488 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTnpointStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTnpointStboxLogicalFunction::NadTnpointStboxLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTnpointStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTnpointStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTnpointStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTnpointStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "NadTnpointStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTnpointStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTnpointStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTnpointStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTnpointStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTnpointStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTnpointStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "NadTnpointStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return NadTnpointStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTnpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTnpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..cd7452a240 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTnpointTnpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTnpointTnpointLogicalFunction::NadTnpointTnpointLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts, + LogicalFunction rid0, + LogicalFunction frac0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(rid0)); + parameters.push_back(std::move(frac0)); + parameters.push_back(std::move(ts0)); +} + +DataType NadTnpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTnpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTnpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTnpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "NadTnpointTnpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTnpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTnpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTnpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTnpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTnpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTnpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "NadTnpointTnpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return NadTnpointTnpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTposeGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTposeGeoLogicalFunction.cpp new file mode 100644 index 0000000000..dc59fdba46 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTposeGeoLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTposeGeoLogicalFunction::NadTposeGeoLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTposeGeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTposeGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTposeGeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTposeGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "NadTposeGeoLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTposeGeoLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTposeGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTposeGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTposeGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTposeGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTposeGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "NadTposeGeoLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return NadTposeGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTposePoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTposePoseLogicalFunction.cpp new file mode 100644 index 0000000000..a7214039e5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTposePoseLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTposePoseLogicalFunction::NadTposePoseLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(7); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); +} + +DataType NadTposePoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTposePoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTposePoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTposePoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "NadTposePoseLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTposePoseLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTposePoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTposePoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTposePoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTposePoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTposePoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "NadTposePoseLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return NadTposePoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTposeStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTposeStboxLogicalFunction.cpp new file mode 100644 index 0000000000..fcfc4f24b2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTposeStboxLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTposeStboxLogicalFunction::NadTposeStboxLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType NadTposeStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTposeStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTposeStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTposeStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "NadTposeStboxLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTposeStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTposeStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTposeStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTposeStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTposeStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTposeStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "NadTposeStboxLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return NadTposeStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTposeTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTposeTposeLogicalFunction.cpp new file mode 100644 index 0000000000..c376842399 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTposeTposeLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTposeTposeLogicalFunction::NadTposeTposeLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction ts, + LogicalFunction px0, + LogicalFunction py0, + LogicalFunction ptheta0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(px0)); + parameters.push_back(std::move(py0)); + parameters.push_back(std::move(ptheta0)); + parameters.push_back(std::move(ts0)); +} + +DataType NadTposeTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction NadTposeTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector NadTposeTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction NadTposeTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "NadTposeTposeLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view NadTposeTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool NadTposeTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string NadTposeTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction NadTposeTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction NadTposeTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTposeTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "NadTposeTposeLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return NadTposeTposeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTrgeometryGeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTrgeometryGeoLogicalFunction.cpp new file mode 100644 index 0000000000..222a503a8f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTrgeometryGeoLogicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTrgeometryGeoLogicalFunction::NadTrgeometryGeoLogicalFunction(LogicalFunction ref_wkt, LogicalFunction x, LogicalFunction y, LogicalFunction theta, LogicalFunction ts, LogicalFunction tgt_wkt) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ref_wkt)); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tgt_wkt)); +} + +DataType NadTrgeometryGeoLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction NadTrgeometryGeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector NadTrgeometryGeoLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction NadTrgeometryGeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, + "NadTrgeometryGeoLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view NadTrgeometryGeoLogicalFunction::getType() const { return NAME; } + +bool NadTrgeometryGeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string NadTrgeometryGeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction NadTrgeometryGeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(6); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "tgt_wkt must be VARSIZED"); + return withChildren(c); +} + +SerializableFunction NadTrgeometryGeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTrgeometryGeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "NadTrgeometryGeoLogicalFunction requires 6 children but got {}", + arguments.children.size()); + return NadTrgeometryGeoLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.cpp new file mode 100644 index 0000000000..1785fef017 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/NadTrgeometryTrgeometryLogicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +NadTrgeometryTrgeometryLogicalFunction::NadTrgeometryTrgeometryLogicalFunction(LogicalFunction ref1_wkt, LogicalFunction x1, LogicalFunction y1, LogicalFunction theta1, LogicalFunction ts1, LogicalFunction ref2_wkt, LogicalFunction x2, LogicalFunction y2, LogicalFunction theta2, LogicalFunction ts2) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(10); + parameters.push_back(std::move(ref1_wkt)); + parameters.push_back(std::move(x1)); + parameters.push_back(std::move(y1)); + parameters.push_back(std::move(theta1)); + parameters.push_back(std::move(ts1)); + parameters.push_back(std::move(ref2_wkt)); + parameters.push_back(std::move(x2)); + parameters.push_back(std::move(y2)); + parameters.push_back(std::move(theta2)); + parameters.push_back(std::move(ts2)); +} + +DataType NadTrgeometryTrgeometryLogicalFunction::getDataType() const { return dataType; } + +LogicalFunction NadTrgeometryTrgeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; copy.dataType = newDataType; return copy; +} + +std::vector NadTrgeometryTrgeometryLogicalFunction::getChildren() const { return parameters; } + +LogicalFunction NadTrgeometryTrgeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 10, + "NadTrgeometryTrgeometryLogicalFunction requires 10 children, but got {}", children.size()); + auto copy = *this; copy.parameters = children; return copy; +} + +std::string_view NadTrgeometryTrgeometryLogicalFunction::getType() const { return NAME; } + +bool NadTrgeometryTrgeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + return parameters == other->parameters; + return false; +} + +std::string NadTrgeometryTrgeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + return fmt::format("{}({})", NAME, parameters[0].explain(verbosity)); +} + +LogicalFunction NadTrgeometryTrgeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector c; + c.reserve(10); + for (const auto& p : parameters) + c.emplace_back(p.withInferredDataType(schema)); + INVARIANT(c[0].getDataType().isType(DataType::Type::VARSIZED), "ref1_wkt must be VARSIZED"); + INVARIANT(c[1].getDataType().isType(DataType::Type::FLOAT64), "x1 must be FLOAT64"); + INVARIANT(c[2].getDataType().isType(DataType::Type::FLOAT64), "y1 must be FLOAT64"); + INVARIANT(c[3].getDataType().isType(DataType::Type::FLOAT64), "theta1 must be FLOAT64"); + INVARIANT(c[4].getDataType().isType(DataType::Type::UINT64), "ts1 must be UINT64"); + INVARIANT(c[5].getDataType().isType(DataType::Type::VARSIZED), "ref2_wkt must be VARSIZED"); + INVARIANT(c[6].getDataType().isType(DataType::Type::FLOAT64), "x2 must be FLOAT64"); + INVARIANT(c[7].getDataType().isType(DataType::Type::FLOAT64), "y2 must be FLOAT64"); + INVARIANT(c[8].getDataType().isType(DataType::Type::FLOAT64), "theta2 must be FLOAT64"); + INVARIANT(c[9].getDataType().isType(DataType::Type::UINT64), "ts2 must be UINT64"); + return withChildren(c); +} + +SerializableFunction NadTrgeometryTrgeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + proto.add_children()->CopyFrom(child.serialize()); + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterNadTrgeometryTrgeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 10, + "NadTrgeometryTrgeometryLogicalFunction requires 10 children but got {}", + arguments.children.size()); + return NadTrgeometryTrgeometryLogicalFunction( + std::move(arguments.children[0]), + std::move(arguments.children[1]), + std::move(arguments.children[2]), + std::move(arguments.children[3]), + std::move(arguments.children[4]), + std::move(arguments.children[5]), + std::move(arguments.children[6]), + std::move(arguments.children[7]), + std::move(arguments.children[8]), + std::move(arguments.children[9])); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OveraboveStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OveraboveStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..a406566bef --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OveraboveStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OveraboveStboxStboxLogicalFunction::OveraboveStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OveraboveStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OveraboveStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OveraboveStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OveraboveStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OveraboveStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OveraboveStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OveraboveStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OveraboveStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OveraboveStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OveraboveStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOveraboveStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OveraboveStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OveraboveStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OveraboveStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OveraboveStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..fdfdd2eca6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OveraboveStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OveraboveStboxTspatialLogicalFunction::OveraboveStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OveraboveStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OveraboveStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OveraboveStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OveraboveStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OveraboveStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OveraboveStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OveraboveStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OveraboveStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OveraboveStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OveraboveStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOveraboveStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OveraboveStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OveraboveStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OveraboveTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OveraboveTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..06d46976d0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OveraboveTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OveraboveTspatialStboxLogicalFunction::OveraboveTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OveraboveTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OveraboveTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OveraboveTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OveraboveTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OveraboveTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OveraboveTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OveraboveTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OveraboveTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OveraboveTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OveraboveTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOveraboveTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OveraboveTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OveraboveTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..a6549b0179 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OveraboveTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OveraboveTspatialTspatialLogicalFunction::OveraboveTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OveraboveTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OveraboveTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OveraboveTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OveraboveTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OveraboveTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OveraboveTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OveraboveTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OveraboveTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OveraboveTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OveraboveTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOveraboveTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OveraboveTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OveraboveTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..06e1e095a2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterStboxStboxLogicalFunction::OverafterStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverafterStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverafterStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverafterStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverafterStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..2ca1bd1a7a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterStboxTspatialLogicalFunction::OverafterStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverafterStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverafterStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverafterStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverafterStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..6195225670 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterTboxTnumberLogicalFunction::OverafterTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverafterTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverafterTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverafterTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverafterTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..330eb34fbb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterTemporalTemporalLogicalFunction::OverafterTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverafterTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverafterTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverafterTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverafterTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..a48286ed9e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterTnumberTboxLogicalFunction::OverafterTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverafterTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverafterTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverafterTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverafterTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..89c118487e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterTnumberTnumberLogicalFunction::OverafterTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType OverafterTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverafterTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverafterTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverafterTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..b916496a1b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterTspatialStboxLogicalFunction::OverafterTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverafterTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverafterTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverafterTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverafterTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverafterTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverafterTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..0362025f19 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverafterTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverafterTspatialTspatialLogicalFunction::OverafterTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverafterTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverafterTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverafterTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverafterTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverafterTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverafterTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverafterTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverafterTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverafterTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverafterTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverafterTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverafterTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverafterTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbackStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbackStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..d49a472301 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbackStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbackStboxStboxLogicalFunction::OverbackStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbackStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbackStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbackStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbackStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverbackStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbackStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbackStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbackStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbackStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbackStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbackStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverbackStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverbackStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbackStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbackStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..af8289745a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbackStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbackStboxTspatialLogicalFunction::OverbackStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbackStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbackStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbackStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbackStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverbackStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbackStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbackStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbackStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbackStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbackStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbackStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverbackStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverbackStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbackTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbackTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..544750eecb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbackTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbackTspatialStboxLogicalFunction::OverbackTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbackTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbackTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbackTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbackTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverbackTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbackTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbackTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbackTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbackTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbackTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbackTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverbackTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverbackTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbackTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbackTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..4309d6e20d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbackTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbackTspatialTspatialLogicalFunction::OverbackTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverbackTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbackTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbackTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbackTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverbackTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbackTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbackTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbackTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbackTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbackTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbackTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverbackTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverbackTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..a61cbd1c4e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeStboxStboxLogicalFunction::OverbeforeStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbeforeStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverbeforeStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverbeforeStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverbeforeStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..ad4b87862a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeStboxTspatialLogicalFunction::OverbeforeStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbeforeStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverbeforeStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverbeforeStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverbeforeStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..c2cecc6d7b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeTboxTnumberLogicalFunction::OverbeforeTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbeforeTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverbeforeTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverbeforeTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverbeforeTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..5aa39ca3ee --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeTemporalTemporalLogicalFunction::OverbeforeTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverbeforeTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverbeforeTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverbeforeTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverbeforeTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..c8199f41b4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeTnumberTboxLogicalFunction::OverbeforeTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbeforeTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverbeforeTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverbeforeTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverbeforeTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..240c8e210b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeTnumberTnumberLogicalFunction::OverbeforeTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbeforeTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverbeforeTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverbeforeTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverbeforeTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..c99381f273 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeTspatialStboxLogicalFunction::OverbeforeTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbeforeTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverbeforeTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverbeforeTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverbeforeTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..d0fe838329 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbeforeTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbeforeTspatialTspatialLogicalFunction::OverbeforeTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverbeforeTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbeforeTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbeforeTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbeforeTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverbeforeTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbeforeTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbeforeTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbeforeTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbeforeTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbeforeTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbeforeTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverbeforeTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverbeforeTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbelowStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbelowStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..4c97f75844 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbelowStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbelowStboxStboxLogicalFunction::OverbelowStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbelowStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbelowStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbelowStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbelowStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverbelowStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbelowStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbelowStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbelowStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbelowStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbelowStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbelowStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverbelowStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverbelowStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbelowStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbelowStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..cefa869dc3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbelowStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbelowStboxTspatialLogicalFunction::OverbelowStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbelowStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbelowStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbelowStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbelowStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverbelowStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbelowStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbelowStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbelowStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbelowStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbelowStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbelowStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverbelowStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverbelowStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbelowTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbelowTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..dd0b520dbd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbelowTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbelowTspatialStboxLogicalFunction::OverbelowTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverbelowTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbelowTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbelowTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbelowTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverbelowTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbelowTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbelowTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbelowTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbelowTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbelowTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbelowTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverbelowTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverbelowTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..307e6b3c43 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverbelowTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverbelowTspatialTspatialLogicalFunction::OverbelowTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverbelowTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverbelowTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverbelowTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverbelowTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverbelowTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverbelowTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverbelowTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverbelowTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverbelowTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverbelowTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverbelowTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverbelowTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverbelowTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverfrontStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverfrontStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..a2c2771e47 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverfrontStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverfrontStboxStboxLogicalFunction::OverfrontStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverfrontStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverfrontStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverfrontStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverfrontStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverfrontStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverfrontStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverfrontStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverfrontStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverfrontStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverfrontStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverfrontStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverfrontStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverfrontStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverfrontStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverfrontStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..13a056a2f0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverfrontStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverfrontStboxTspatialLogicalFunction::OverfrontStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverfrontStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverfrontStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverfrontStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverfrontStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverfrontStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverfrontStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverfrontStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverfrontStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverfrontStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverfrontStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverfrontStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverfrontStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverfrontStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverfrontTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverfrontTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..599c4e58b1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverfrontTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverfrontTspatialStboxLogicalFunction::OverfrontTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverfrontTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverfrontTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverfrontTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverfrontTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverfrontTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverfrontTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverfrontTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverfrontTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverfrontTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverfrontTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverfrontTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverfrontTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverfrontTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..7485f1019c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverfrontTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverfrontTspatialTspatialLogicalFunction::OverfrontTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverfrontTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverfrontTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverfrontTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverfrontTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverfrontTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverfrontTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverfrontTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverfrontTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverfrontTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverfrontTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverfrontTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverfrontTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverfrontTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..29c27b424c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsStboxStboxLogicalFunction::OverlapsStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverlapsStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverlapsStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverlapsStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverlapsStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..2d05aff6bf --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsStboxTspatialLogicalFunction::OverlapsStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverlapsStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverlapsStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverlapsStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverlapsStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..5b417fa4eb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsTboxTnumberLogicalFunction::OverlapsTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverlapsTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverlapsTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverlapsTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverlapsTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..0ac7bd6773 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsTemporalTemporalLogicalFunction::OverlapsTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverlapsTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverlapsTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverlapsTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverlapsTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..ccbe5f2a1a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsTnumberTboxLogicalFunction::OverlapsTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverlapsTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverlapsTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverlapsTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverlapsTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..4f1e28cb28 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsTnumberTnumberLogicalFunction::OverlapsTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType OverlapsTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverlapsTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverlapsTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverlapsTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..5d1f2cd018 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsTspatialStboxLogicalFunction::OverlapsTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverlapsTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverlapsTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverlapsTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverlapsTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..d64526bfa3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverlapsTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverlapsTspatialTspatialLogicalFunction::OverlapsTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverlapsTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverlapsTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverlapsTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverlapsTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverlapsTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverlapsTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverlapsTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverlapsTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverlapsTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverlapsTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverlapsTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverlapsTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverlapsTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..57d818313f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftStboxStboxLogicalFunction::OverleftStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverleftStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverleftStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverleftStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverleftStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..a66249e0c2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftStboxTspatialLogicalFunction::OverleftStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverleftStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverleftStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverleftStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverleftStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..24495a10b1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftTboxTnumberLogicalFunction::OverleftTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverleftTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverleftTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverleftTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverleftTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..a4e5a8c721 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftTnumberTboxLogicalFunction::OverleftTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverleftTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverleftTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverleftTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverleftTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..c7a96d651d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftTnumberTnumberLogicalFunction::OverleftTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType OverleftTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverleftTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverleftTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverleftTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..77045eed44 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftTspatialStboxLogicalFunction::OverleftTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverleftTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverleftTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverleftTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverleftTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverleftTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverleftTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..23991ca362 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverleftTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverleftTspatialTspatialLogicalFunction::OverleftTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverleftTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverleftTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverleftTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverleftTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverleftTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverleftTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverleftTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverleftTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverleftTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverleftTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverleftTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverleftTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverleftTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..b997f397bf --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightStboxStboxLogicalFunction::OverrightStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType OverrightStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverrightStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverrightStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverrightStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..64c35504aa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightStboxTspatialLogicalFunction::OverrightStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverrightStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverrightStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverrightStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverrightStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..ffa4d03bea --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightTboxTnumberLogicalFunction::OverrightTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverrightTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverrightTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverrightTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverrightTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..8f4ef848d7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightTnumberTboxLogicalFunction::OverrightTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverrightTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "OverrightTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "OverrightTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return OverrightTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..f77ca02383 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightTnumberTnumberLogicalFunction::OverrightTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType OverrightTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "OverrightTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "OverrightTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return OverrightTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..2ceecc1a20 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightTspatialStboxLogicalFunction::OverrightTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType OverrightTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "OverrightTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "OverrightTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return OverrightTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/OverrightTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/OverrightTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..5376769087 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/OverrightTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +OverrightTspatialTspatialLogicalFunction::OverrightTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType OverrightTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction OverrightTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector OverrightTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction OverrightTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "OverrightTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view OverrightTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool OverrightTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string OverrightTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction OverrightTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction OverrightTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterOverrightTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "OverrightTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return OverrightTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinCellAreaLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinCellAreaLogicalFunction.cpp new file mode 100644 index 0000000000..6f1a59a495 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinCellAreaLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinCellAreaLogicalFunction::QuadbinCellAreaLogicalFunction(LogicalFunction cell) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(cell)); +} + +DataType QuadbinCellAreaLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinCellAreaLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinCellAreaLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinCellAreaLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "QuadbinCellAreaLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinCellAreaLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinCellAreaLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinCellAreaLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinCellAreaLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinCellAreaLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinCellAreaLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "QuadbinCellAreaLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return QuadbinCellAreaLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinCellToParentLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinCellToParentLogicalFunction.cpp new file mode 100644 index 0000000000..1f7546988d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinCellToParentLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinCellToParentLogicalFunction::QuadbinCellToParentLogicalFunction(LogicalFunction cell, + LogicalFunction res) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(res)); +} + +DataType QuadbinCellToParentLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinCellToParentLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinCellToParentLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinCellToParentLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinCellToParentLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinCellToParentLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinCellToParentLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinCellToParentLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinCellToParentLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinCellToParentLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinCellToParentLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinCellToParentLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinCellToParentLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.cpp new file mode 100644 index 0000000000..992d783d0c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinCellToQuadkeyLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinCellToQuadkeyLogicalFunction::QuadbinCellToQuadkeyLogicalFunction(LogicalFunction cell) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(cell)); +} + +DataType QuadbinCellToQuadkeyLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinCellToQuadkeyLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinCellToQuadkeyLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinCellToQuadkeyLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "QuadbinCellToQuadkeyLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinCellToQuadkeyLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinCellToQuadkeyLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinCellToQuadkeyLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinCellToQuadkeyLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinCellToQuadkeyLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinCellToQuadkeyLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "QuadbinCellToQuadkeyLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return QuadbinCellToQuadkeyLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinCmpLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinCmpLogicalFunction.cpp new file mode 100644 index 0000000000..80a54f5094 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinCmpLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinCmpLogicalFunction::QuadbinCmpLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinCmpLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinCmpLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinCmpLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinCmpLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinCmpLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinCmpLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinCmpLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinCmpLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinCmpLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinCmpLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinCmpLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinCmpLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinCmpLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinEqLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinEqLogicalFunction.cpp new file mode 100644 index 0000000000..d3bdddf7c4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinEqLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinEqLogicalFunction::QuadbinEqLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinEqLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinEqLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinEqLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinEqLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinEqLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinEqLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinEqLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinEqLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinEqLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinEqLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinEqLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinEqLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinEqLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinGeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinGeLogicalFunction.cpp new file mode 100644 index 0000000000..2cc22f13a6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinGeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinGeLogicalFunction::QuadbinGeLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinGeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinGeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinGeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinGeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinGeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinGeLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinGeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinGeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinGeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinGeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinGeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinGeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinGeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinGetResolutionLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinGetResolutionLogicalFunction.cpp new file mode 100644 index 0000000000..80083d56a2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinGetResolutionLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinGetResolutionLogicalFunction::QuadbinGetResolutionLogicalFunction(LogicalFunction cell) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(cell)); +} + +DataType QuadbinGetResolutionLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinGetResolutionLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinGetResolutionLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinGetResolutionLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "QuadbinGetResolutionLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinGetResolutionLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinGetResolutionLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinGetResolutionLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinGetResolutionLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinGetResolutionLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinGetResolutionLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "QuadbinGetResolutionLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return QuadbinGetResolutionLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinGtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinGtLogicalFunction.cpp new file mode 100644 index 0000000000..a94a0b0f99 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinGtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinGtLogicalFunction::QuadbinGtLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinGtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinGtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinGtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinGtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinGtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinGtLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinGtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinGtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinGtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinGtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinGtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinGtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinGtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinIsValidCellLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinIsValidCellLogicalFunction.cpp new file mode 100644 index 0000000000..63b0890715 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinIsValidCellLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinIsValidCellLogicalFunction::QuadbinIsValidCellLogicalFunction(LogicalFunction cell) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(cell)); +} + +DataType QuadbinIsValidCellLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinIsValidCellLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinIsValidCellLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinIsValidCellLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "QuadbinIsValidCellLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinIsValidCellLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinIsValidCellLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinIsValidCellLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinIsValidCellLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinIsValidCellLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinIsValidCellLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "QuadbinIsValidCellLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return QuadbinIsValidCellLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinLeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinLeLogicalFunction.cpp new file mode 100644 index 0000000000..6de712af8d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinLeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinLeLogicalFunction::QuadbinLeLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinLeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinLeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinLeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinLeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinLeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinLeLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinLeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinLeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinLeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinLeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinLeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinLeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinLeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinLtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinLtLogicalFunction.cpp new file mode 100644 index 0000000000..d925d6de7b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinLtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinLtLogicalFunction::QuadbinLtLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinLtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinLtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinLtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinLtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinLtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinLtLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinLtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinLtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinLtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinLtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinLtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinLtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinLtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinNeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinNeLogicalFunction.cpp new file mode 100644 index 0000000000..64ec3f49fc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinNeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinNeLogicalFunction::QuadbinNeLogicalFunction(LogicalFunction a, + LogicalFunction b) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(a)); + parameters.push_back(std::move(b)); +} + +DataType QuadbinNeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinNeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinNeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinNeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "QuadbinNeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinNeLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinNeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinNeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinNeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinNeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinNeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "QuadbinNeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return QuadbinNeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinPointToCellLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinPointToCellLogicalFunction.cpp new file mode 100644 index 0000000000..17ce9231a8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinPointToCellLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinPointToCellLogicalFunction::QuadbinPointToCellLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction res) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(res)); +} + +DataType QuadbinPointToCellLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinPointToCellLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinPointToCellLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinPointToCellLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "QuadbinPointToCellLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinPointToCellLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinPointToCellLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinPointToCellLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinPointToCellLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinPointToCellLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinPointToCellLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "QuadbinPointToCellLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return QuadbinPointToCellLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/QuadbinTileToCellLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/QuadbinTileToCellLogicalFunction.cpp new file mode 100644 index 0000000000..3520904fa8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/QuadbinTileToCellLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +QuadbinTileToCellLogicalFunction::QuadbinTileToCellLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction z) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(z)); +} + +DataType QuadbinTileToCellLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction QuadbinTileToCellLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector QuadbinTileToCellLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction QuadbinTileToCellLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "QuadbinTileToCellLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view QuadbinTileToCellLogicalFunction::getType() const +{ + return NAME; +} + +bool QuadbinTileToCellLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string QuadbinTileToCellLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction QuadbinTileToCellLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction QuadbinTileToCellLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterQuadbinTileToCellLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "QuadbinTileToCellLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return QuadbinTileToCellLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..545a6402af --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightStboxStboxLogicalFunction::RightStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType RightStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "RightStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool RightStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "RightStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return RightStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..bf1affcd4f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightStboxTspatialLogicalFunction::RightStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType RightStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "RightStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool RightStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "RightStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return RightStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..1c4d4a20c9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightTboxTnumberLogicalFunction::RightTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType RightTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "RightTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool RightTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "RightTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return RightTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..4b507b0996 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightTnumberTboxLogicalFunction::RightTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType RightTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "RightTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool RightTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "RightTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return RightTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..8316a4dd01 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightTnumberTnumberLogicalFunction::RightTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType RightTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "RightTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool RightTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "RightTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return RightTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..f9e64f8169 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightTspatialStboxLogicalFunction::RightTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType RightTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "RightTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool RightTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "RightTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return RightTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/RightTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/RightTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..a47d9dbf1d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/RightTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +RightTspatialTspatialLogicalFunction::RightTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType RightTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction RightTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector RightTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction RightTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "RightTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view RightTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool RightTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string RightTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction RightTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction RightTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterRightTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "RightTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return RightTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameStboxStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameStboxStboxLogicalFunction.cpp new file mode 100644 index 0000000000..c6bfbf851a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameStboxStboxLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameStboxStboxLogicalFunction::SameStboxStboxLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType SameStboxStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameStboxStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameStboxStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameStboxStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "SameStboxStboxLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameStboxStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool SameStboxStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameStboxStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameStboxStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameStboxStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameStboxStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "SameStboxStboxLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return SameStboxStboxLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameStboxTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameStboxTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..bb9ec33481 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameStboxTspatialLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameStboxTspatialLogicalFunction::SameStboxTspatialLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SameStboxTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameStboxTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameStboxTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameStboxTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "SameStboxTspatialLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameStboxTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool SameStboxTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameStboxTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameStboxTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameStboxTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameStboxTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "SameStboxTspatialLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return SameStboxTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameTboxTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameTboxTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..19e075988b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameTboxTnumberLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameTboxTnumberLogicalFunction::SameTboxTnumberLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SameTboxTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameTboxTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameTboxTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameTboxTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SameTboxTnumberLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameTboxTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool SameTboxTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameTboxTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameTboxTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameTboxTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameTboxTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SameTboxTnumberLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SameTboxTnumberLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameTemporalTemporalLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameTemporalTemporalLogicalFunction.cpp new file mode 100644 index 0000000000..f92b6844e7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameTemporalTemporalLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameTemporalTemporalLogicalFunction::SameTemporalTemporalLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType SameTemporalTemporalLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameTemporalTemporalLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameTemporalTemporalLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameTemporalTemporalLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "SameTemporalTemporalLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameTemporalTemporalLogicalFunction::getType() const +{ + return NAME; +} + +bool SameTemporalTemporalLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameTemporalTemporalLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameTemporalTemporalLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameTemporalTemporalLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameTemporalTemporalLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "SameTemporalTemporalLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return SameTemporalTemporalLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameTnumberTboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameTnumberTboxLogicalFunction.cpp new file mode 100644 index 0000000000..dc117980fc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameTnumberTboxLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameTnumberTboxLogicalFunction::SameTnumberTboxLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SameTnumberTboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameTnumberTboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameTnumberTboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameTnumberTboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SameTnumberTboxLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameTnumberTboxLogicalFunction::getType() const +{ + return NAME; +} + +bool SameTnumberTboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameTnumberTboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameTnumberTboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameTnumberTboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameTnumberTboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SameTnumberTboxLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SameTnumberTboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..6329732728 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameTnumberTnumberLogicalFunction::SameTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType SameTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "SameTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool SameTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "SameTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return SameTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameTspatialStboxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameTspatialStboxLogicalFunction.cpp new file mode 100644 index 0000000000..ea00d31d74 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameTspatialStboxLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameTspatialStboxLogicalFunction::SameTspatialStboxLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SameTspatialStboxLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameTspatialStboxLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameTspatialStboxLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameTspatialStboxLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "SameTspatialStboxLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameTspatialStboxLogicalFunction::getType() const +{ + return NAME; +} + +bool SameTspatialStboxLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameTspatialStboxLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameTspatialStboxLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameTspatialStboxLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameTspatialStboxLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "SameTspatialStboxLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return SameTspatialStboxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SameTspatialTspatialLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SameTspatialTspatialLogicalFunction.cpp new file mode 100644 index 0000000000..0cccc4e12e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SameTspatialTspatialLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SameTspatialTspatialLogicalFunction::SameTspatialTspatialLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType SameTspatialTspatialLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SameTspatialTspatialLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SameTspatialTspatialLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SameTspatialTspatialLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "SameTspatialTspatialLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SameTspatialTspatialLogicalFunction::getType() const +{ + return NAME; +} + +bool SameTspatialTspatialLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SameTspatialTspatialLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SameTspatialTspatialLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SameTspatialTspatialLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSameTspatialTspatialLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "SameTspatialTspatialLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return SameTspatialTspatialLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxCmpLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxCmpLogicalFunction.cpp new file mode 100644 index 0000000000..435795edef --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxCmpLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxCmpLogicalFunction::StboxCmpLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxCmpLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxCmpLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxCmpLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxCmpLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxCmpLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxCmpLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxCmpLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxCmpLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxCmpLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxCmpLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxCmpLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxCmpLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxCmpLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxEqLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxEqLogicalFunction.cpp new file mode 100644 index 0000000000..c53ffd7c36 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxEqLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxEqLogicalFunction::StboxEqLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxEqLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxEqLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxEqLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxEqLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxEqLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxEqLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxEqLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxEqLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxEqLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxEqLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxEqLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxEqLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxEqLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxGeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxGeLogicalFunction.cpp new file mode 100644 index 0000000000..923a6099cc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxGeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxGeLogicalFunction::StboxGeLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxGeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxGeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxGeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxGeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxGeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxGeLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxGeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxGeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxGeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxGeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxGeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxGeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxGeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxGtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxGtLogicalFunction.cpp new file mode 100644 index 0000000000..c4b43dc4d6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxGtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxGtLogicalFunction::StboxGtLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxGtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxGtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxGtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxGtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxGtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxGtLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxGtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxGtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxGtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxGtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxGtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxGtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxGtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxLeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxLeLogicalFunction.cpp new file mode 100644 index 0000000000..ee7735e706 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxLeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxLeLogicalFunction::StboxLeLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxLeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxLeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxLeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxLeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxLeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxLeLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxLeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxLeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxLeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxLeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxLeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxLeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxLeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxLtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxLtLogicalFunction.cpp new file mode 100644 index 0000000000..51c13cdcde --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxLtLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxLtLogicalFunction::StboxLtLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxLtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxLtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxLtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxLtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxLtLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxLtLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxLtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxLtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxLtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxLtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxLtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxLtLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxLtLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/StboxNeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/StboxNeLogicalFunction.cpp new file mode 100644 index 0000000000..13bbbbd47c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/StboxNeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +StboxNeLogicalFunction::StboxNeLogicalFunction(LogicalFunction box, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(box)); + parameters.push_back(std::move(arg0)); +} + +DataType StboxNeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction StboxNeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector StboxNeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction StboxNeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "StboxNeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view StboxNeLogicalFunction::getType() const +{ + return NAME; +} + +bool StboxNeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string StboxNeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction StboxNeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction StboxNeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterStboxNeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "StboxNeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return StboxNeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubBigintTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubBigintTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..96da9df974 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubBigintTbigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubBigintTbigintLogicalFunction::SubBigintTbigintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType SubBigintTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubBigintTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubBigintTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubBigintTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SubBigintTbigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubBigintTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool SubBigintTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubBigintTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubBigintTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubBigintTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubBigintTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SubBigintTbigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SubBigintTbigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubFloatTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubFloatTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..23e7ca2812 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubFloatTfloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubFloatTfloatLogicalFunction::SubFloatTfloatLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType SubFloatTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubFloatTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubFloatTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubFloatTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SubFloatTfloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubFloatTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool SubFloatTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubFloatTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubFloatTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubFloatTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubFloatTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SubFloatTfloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SubFloatTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubIntTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubIntTintLogicalFunction.cpp new file mode 100644 index 0000000000..28129a305f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubIntTintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubIntTintLogicalFunction::SubIntTintLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType SubIntTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubIntTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubIntTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubIntTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SubIntTintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubIntTintLogicalFunction::getType() const +{ + return NAME; +} + +bool SubIntTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubIntTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubIntTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubIntTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubIntTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SubIntTintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SubIntTintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubTbigintBigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubTbigintBigintLogicalFunction.cpp new file mode 100644 index 0000000000..75215c3d9e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubTbigintBigintLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubTbigintBigintLogicalFunction::SubTbigintBigintLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SubTbigintBigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubTbigintBigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubTbigintBigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubTbigintBigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SubTbigintBigintLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubTbigintBigintLogicalFunction::getType() const +{ + return NAME; +} + +bool SubTbigintBigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubTbigintBigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubTbigintBigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubTbigintBigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubTbigintBigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SubTbigintBigintLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SubTbigintBigintLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..7c39fdfb03 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubTfloatFloatLogicalFunction::SubTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SubTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SubTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool SubTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SubTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SubTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..0c604b53d7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubTintIntLogicalFunction::SubTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType SubTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "SubTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool SubTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "SubTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return SubTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/SubTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/SubTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..cd8bbbd10a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/SubTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +SubTnumberTnumberLogicalFunction::SubTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType SubTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction SubTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector SubTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction SubTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "SubTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view SubTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool SubTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string SubTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction SubTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction SubTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterSubTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "SubTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return SubTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TEqTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TEqTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..e9cbbdf3cd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TEqTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TEqTextTtextLogicalFunction::TEqTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TEqTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TEqTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TEqTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TEqTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TEqTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TEqTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TEqTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TEqTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TEqTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TEqTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTEqTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TEqTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TEqTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TEqTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TEqTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..a0c102c9dc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TEqTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TEqTtextTextLogicalFunction::TEqTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TEqTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TEqTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TEqTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TEqTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TEqTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TEqTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TEqTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TEqTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TEqTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TEqTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTEqTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TEqTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TEqTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TGeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TGeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..19746e11cd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TGeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TGeTextTtextLogicalFunction::TGeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TGeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TGeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TGeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TGeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TGeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TGeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TGeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TGeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TGeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TGeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTGeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TGeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TGeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TGeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TGeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..ce731c6baa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TGeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TGeTtextTextLogicalFunction::TGeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TGeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TGeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TGeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TGeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TGeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TGeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TGeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TGeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TGeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TGeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTGeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TGeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TGeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TGtTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TGtTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..1358e902bf --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TGtTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TGtTextTtextLogicalFunction::TGtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TGtTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TGtTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TGtTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TGtTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TGtTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TGtTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TGtTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TGtTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TGtTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TGtTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTGtTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TGtTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TGtTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TGtTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TGtTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..f520dfe274 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TGtTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TGtTtextTextLogicalFunction::TGtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TGtTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TGtTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TGtTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TGtTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TGtTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TGtTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TGtTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TGtTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TGtTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TGtTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTGtTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TGtTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TGtTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TLeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TLeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..fe2276ff7c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TLeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TLeTextTtextLogicalFunction::TLeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TLeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TLeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TLeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TLeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TLeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TLeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TLeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TLeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TLeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TLeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTLeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TLeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TLeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TLeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TLeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..cb08e562c8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TLeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TLeTtextTextLogicalFunction::TLeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TLeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TLeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TLeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TLeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TLeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TLeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TLeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TLeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TLeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TLeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTLeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TLeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TLeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TLtTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TLtTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..feb9c52352 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TLtTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TLtTextTtextLogicalFunction::TLtTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TLtTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TLtTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TLtTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TLtTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TLtTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TLtTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TLtTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TLtTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TLtTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TLtTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTLtTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TLtTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TLtTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TLtTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TLtTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..8db59152c0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TLtTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TLtTtextTextLogicalFunction::TLtTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TLtTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TLtTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TLtTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TLtTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TLtTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TLtTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TLtTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TLtTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TLtTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TLtTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTLtTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TLtTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TLtTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TNeTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TNeTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..57ff63982c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TNeTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TNeTextTtextLogicalFunction::TNeTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TNeTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TNeTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TNeTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TNeTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TNeTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TNeTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TNeTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TNeTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TNeTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TNeTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTNeTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TNeTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TNeTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TNeTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TNeTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..8715c6021a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TNeTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TNeTtextTextLogicalFunction::TNeTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TNeTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TNeTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TNeTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TNeTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TNeTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TNeTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TNeTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TNeTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TNeTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TNeTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTNeTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TNeTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TNeTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TandBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TandBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..7684111cc4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TandBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TandBoolTboolLogicalFunction::TandBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TandBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TandBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TandBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TandBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TandBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TandBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TandBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TandBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TandBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TandBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTandBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TandBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TandBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TandTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TandTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..85982de0ca --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TandTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TandTboolBoolLogicalFunction::TandTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TandTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TandTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TandTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TandTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TandTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TandTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool TandTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TandTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TandTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TandTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTandTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TandTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TandTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TandTboolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TandTboolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..6fe4d7d7bc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TandTboolTboolLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TandTboolTboolLogicalFunction::TandTboolTboolLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TandTboolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TandTboolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TandTboolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TandTboolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TandTboolTboolLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TandTboolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TandTboolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TandTboolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TandTboolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TandTboolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTandTboolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TandTboolTboolLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TandTboolTboolLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TbigintScaleValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TbigintScaleValueLogicalFunction.cpp new file mode 100644 index 0000000000..ba0a7f7b7e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TbigintScaleValueLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TbigintScaleValueLogicalFunction::TbigintScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TbigintScaleValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TbigintScaleValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TbigintScaleValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TbigintScaleValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TbigintScaleValueLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TbigintScaleValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TbigintScaleValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TbigintScaleValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TbigintScaleValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TbigintScaleValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTbigintScaleValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TbigintScaleValueLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TbigintScaleValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TbigintShiftScaleValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TbigintShiftScaleValueLogicalFunction.cpp new file mode 100644 index 0000000000..e827f5208d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TbigintShiftScaleValueLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TbigintShiftScaleValueLogicalFunction::TbigintShiftScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType TbigintShiftScaleValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TbigintShiftScaleValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TbigintShiftScaleValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TbigintShiftScaleValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TbigintShiftScaleValueLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TbigintShiftScaleValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TbigintShiftScaleValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TbigintShiftScaleValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TbigintShiftScaleValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TbigintShiftScaleValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTbigintShiftScaleValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TbigintShiftScaleValueLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TbigintShiftScaleValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TbigintShiftValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TbigintShiftValueLogicalFunction.cpp new file mode 100644 index 0000000000..f8ec40e420 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TbigintShiftValueLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TbigintShiftValueLogicalFunction::TbigintShiftValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TbigintShiftValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TbigintShiftValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TbigintShiftValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TbigintShiftValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TbigintShiftValueLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TbigintShiftValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TbigintShiftValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TbigintShiftValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TbigintShiftValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TbigintShiftValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTbigintShiftValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TbigintShiftValueLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TbigintShiftValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TbigintToTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TbigintToTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..8edc6c58aa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TbigintToTfloatLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TbigintToTfloatLogicalFunction::TbigintToTfloatLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TbigintToTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TbigintToTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TbigintToTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TbigintToTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TbigintToTfloatLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TbigintToTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TbigintToTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TbigintToTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TbigintToTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TbigintToTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTbigintToTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TbigintToTfloatLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TbigintToTfloatLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TbigintToTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TbigintToTintLogicalFunction.cpp new file mode 100644 index 0000000000..98d455635b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TbigintToTintLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TbigintToTintLogicalFunction::TbigintToTintLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TbigintToTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TbigintToTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TbigintToTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TbigintToTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TbigintToTintLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TbigintToTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TbigintToTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TbigintToTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TbigintToTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TbigintToTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTbigintToTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TbigintToTintLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TbigintToTintLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TboolEndValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TboolEndValueLogicalFunction.cpp new file mode 100644 index 0000000000..d9e2abb301 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TboolEndValueLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TboolEndValueLogicalFunction::TboolEndValueLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TboolEndValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TboolEndValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TboolEndValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TboolEndValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TboolEndValueLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TboolEndValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TboolEndValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TboolEndValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TboolEndValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TboolEndValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTboolEndValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TboolEndValueLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TboolEndValueLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TboolStartValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TboolStartValueLogicalFunction.cpp new file mode 100644 index 0000000000..bbea7e5d52 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TboolStartValueLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TboolStartValueLogicalFunction::TboolStartValueLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TboolStartValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TboolStartValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TboolStartValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TboolStartValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TboolStartValueLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TboolStartValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TboolStartValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TboolStartValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TboolStartValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TboolStartValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTboolStartValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TboolStartValueLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TboolStartValueLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TboolToTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TboolToTintLogicalFunction.cpp new file mode 100644 index 0000000000..e588b4993e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TboolToTintLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TboolToTintLogicalFunction::TboolToTintLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TboolToTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TboolToTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TboolToTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TboolToTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TboolToTintLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TboolToTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TboolToTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TboolToTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TboolToTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TboolToTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTboolToTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TboolToTintLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TboolToTintLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TcbufferToTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TcbufferToTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..931f266d1c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TcbufferToTfloatLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TcbufferToTfloatLogicalFunction::TcbufferToTfloatLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(ts)); +} + +DataType TcbufferToTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TcbufferToTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TcbufferToTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TcbufferToTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TcbufferToTfloatLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TcbufferToTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TcbufferToTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TcbufferToTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TcbufferToTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TcbufferToTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTcbufferToTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TcbufferToTfloatLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TcbufferToTfloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..cb075e552f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TcontainsTcbufferTcbufferLogicalFunction::TcontainsTcbufferTcbufferLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TcontainsTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TcontainsTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TcontainsTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TcontainsTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TcontainsTcbufferTcbufferLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TcontainsTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TcontainsTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TcontainsTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TcontainsTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TcontainsTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTcontainsTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TcontainsTcbufferTcbufferLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TcontainsTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..39c68e9823 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TcontainsTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TcontainsTgeoTgeoLogicalFunction::TcontainsTgeoTgeoLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TcontainsTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TcontainsTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TcontainsTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TcontainsTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TcontainsTgeoTgeoLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TcontainsTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool TcontainsTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TcontainsTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TcontainsTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TcontainsTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTcontainsTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TcontainsTgeoTgeoLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TcontainsTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..26d9438b2d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TcoversTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TcoversTcbufferTcbufferLogicalFunction::TcoversTcbufferTcbufferLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TcoversTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TcoversTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TcoversTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TcoversTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TcoversTcbufferTcbufferLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TcoversTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TcoversTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TcoversTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TcoversTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TcoversTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTcoversTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TcoversTcbufferTcbufferLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TcoversTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TcoversTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TcoversTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..d24a98c2df --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TcoversTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TcoversTgeoTgeoLogicalFunction::TcoversTgeoTgeoLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TcoversTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TcoversTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TcoversTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TcoversTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TcoversTgeoTgeoLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TcoversTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool TcoversTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TcoversTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TcoversTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TcoversTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTcoversTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TcoversTgeoTgeoLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TcoversTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.cpp new file mode 100644 index 0000000000..fbb1db5dfe --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTcbufferTcbufferLogicalFunction::TdistanceTcbufferTcbufferLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTcbufferTcbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTcbufferTcbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTcbufferTcbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTcbufferTcbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TdistanceTcbufferTcbufferLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTcbufferTcbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTcbufferTcbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTcbufferTcbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTcbufferTcbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTcbufferTcbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTcbufferTcbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TdistanceTcbufferTcbufferLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TdistanceTcbufferTcbufferLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTfloatFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTfloatFloatLogicalFunction.cpp new file mode 100644 index 0000000000..595196749b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTfloatFloatLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTfloatFloatLogicalFunction::TdistanceTfloatFloatLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTfloatFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTfloatFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTfloatFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTfloatFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TdistanceTfloatFloatLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTfloatFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTfloatFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTfloatFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTfloatFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTfloatFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTfloatFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TdistanceTfloatFloatLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TdistanceTfloatFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.cpp new file mode 100644 index 0000000000..d7208abf3a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTgeoTgeoLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTgeoTgeoLogicalFunction::TdistanceTgeoTgeoLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTgeoTgeoLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTgeoTgeoLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTgeoTgeoLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTgeoTgeoLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TdistanceTgeoTgeoLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTgeoTgeoLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTgeoTgeoLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTgeoTgeoLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTgeoTgeoLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTgeoTgeoLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTgeoTgeoLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TdistanceTgeoTgeoLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TdistanceTgeoTgeoLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTintIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTintIntLogicalFunction.cpp new file mode 100644 index 0000000000..1e3293e4c2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTintIntLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTintIntLogicalFunction::TdistanceTintIntLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTintIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTintIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTintIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTintIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TdistanceTintIntLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTintIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTintIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTintIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTintIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTintIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTintIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TdistanceTintIntLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TdistanceTintIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.cpp new file mode 100644 index 0000000000..6d9581f36b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTnpointTnpointLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTnpointTnpointLogicalFunction::TdistanceTnpointTnpointLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTnpointTnpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTnpointTnpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTnpointTnpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTnpointTnpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TdistanceTnpointTnpointLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTnpointTnpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTnpointTnpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTnpointTnpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTnpointTnpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTnpointTnpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTnpointTnpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TdistanceTnpointTnpointLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TdistanceTnpointTnpointLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.cpp new file mode 100644 index 0000000000..e745bd00d3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTnumberTnumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTnumberTnumberLogicalFunction::TdistanceTnumberTnumberLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTnumberTnumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTnumberTnumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTnumberTnumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTnumberTnumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TdistanceTnumberTnumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTnumberTnumberLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTnumberTnumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTnumberTnumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTnumberTnumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTnumberTnumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTnumberTnumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TdistanceTnumberTnumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TdistanceTnumberTnumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TdistanceTposeTposeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TdistanceTposeTposeLogicalFunction.cpp new file mode 100644 index 0000000000..49a25a222f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TdistanceTposeTposeLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TdistanceTposeTposeLogicalFunction::TdistanceTposeTposeLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TdistanceTposeTposeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TdistanceTposeTposeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TdistanceTposeTposeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TdistanceTposeTposeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TdistanceTposeTposeLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TdistanceTposeTposeLogicalFunction::getType() const +{ + return NAME; +} + +bool TdistanceTposeTposeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TdistanceTposeTposeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TdistanceTposeTposeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TdistanceTposeTposeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTdistanceTposeTposeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TdistanceTposeTposeLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TdistanceTposeTposeLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..9a8c15f5a3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsGeometryLogicalFunction::TemporalAContainsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAContainsGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalAContainsGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalAContainsGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalAContainsGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..7604bef0b7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTCbufferCbufferLogicalFunction::TemporalAContainsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalAContainsTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalAContainsTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalAContainsTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalAContainsTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..6f68820e93 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTCbufferLogicalFunction::TemporalAContainsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAContainsTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalAContainsTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalAContainsTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalAContainsTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..4d06e3ee93 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTGeometryLogicalFunction::TemporalAContainsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAContainsTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalAContainsTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalAContainsTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalAContainsTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..dba3ab64a2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTNpointGeometryLogicalFunction::TemporalAContainsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAContainsTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalAContainsTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalAContainsTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalAContainsTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..cdfed10b7b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTNpointTNpointLogicalFunction::TemporalAContainsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAContainsTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalAContainsTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalAContainsTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalAContainsTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..a6f30574fd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTPoseGeometryLogicalFunction::TemporalAContainsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAContainsTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalAContainsTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalAContainsTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalAContainsTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..5e9e42c95d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAContainsTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAContainsTPoseTPoseLogicalFunction::TemporalAContainsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAContainsTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAContainsTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAContainsTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAContainsTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalAContainsTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAContainsTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAContainsTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAContainsTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAContainsTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAContainsTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalAContainsTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalAContainsTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..c3c6523556 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalACoversTCbufferCbufferLogicalFunction::TemporalACoversTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalACoversTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalACoversTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalACoversTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalACoversTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalACoversTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalACoversTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalACoversTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalACoversTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalACoversTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalACoversTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalACoversTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalACoversTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalACoversTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..318be3f43f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalACoversTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalACoversTCbufferLogicalFunction::TemporalACoversTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalACoversTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalACoversTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalACoversTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalACoversTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalACoversTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalACoversTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalACoversTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalACoversTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalACoversTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalACoversTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalACoversTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalACoversTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalACoversTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..82cf67f471 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinGeometryLogicalFunction::TemporalADWithinGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalADWithinGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalADWithinGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalADWithinGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..f292d2caea --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTCbufferCbufferLogicalFunction::TemporalADWithinTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalADWithinTCbufferCbufferLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalADWithinTCbufferCbufferLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalADWithinTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..d9845de832 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTCbufferGeometryLogicalFunction::TemporalADWithinTCbufferGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTCbufferGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTCbufferGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTCbufferGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTCbufferGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalADWithinTCbufferGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTCbufferGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTCbufferGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTCbufferGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTCbufferGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTCbufferGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTCbufferGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalADWithinTCbufferGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalADWithinTCbufferGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..edbe1be762 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTCbufferTCbufferLogicalFunction::TemporalADWithinTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(9); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "TemporalADWithinTCbufferTCbufferLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "TemporalADWithinTCbufferTCbufferLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return TemporalADWithinTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..52cbdbb012 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTGeometryLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTGeometryLogicalFunction::TemporalADWithinTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(7); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "TemporalADWithinTGeometryLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "TemporalADWithinTGeometryLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return TemporalADWithinTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..9efbfa35f8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTNpointGeometryLogicalFunction::TemporalADWithinTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalADWithinTNpointGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalADWithinTNpointGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalADWithinTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..0fdc8260c0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTNpointTNpointLogicalFunction::TemporalADWithinTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(7); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "TemporalADWithinTNpointTNpointLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "TemporalADWithinTNpointTNpointLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return TemporalADWithinTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..a6e555655f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTPoseGeometryLogicalFunction::TemporalADWithinTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalADWithinTPoseGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalADWithinTPoseGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalADWithinTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..2671303591 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADWithinTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADWithinTPoseTPoseLogicalFunction::TemporalADWithinTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(9); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalADWithinTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADWithinTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADWithinTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADWithinTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "TemporalADWithinTPoseTPoseLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADWithinTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADWithinTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADWithinTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADWithinTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADWithinTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "TemporalADWithinTPoseTPoseLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return TemporalADWithinTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..009c4e88fe --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointGeometryLogicalFunction::TemporalADisjointGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalADisjointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalADisjointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalADisjointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalADisjointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..e47b8f53e7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTCbufferCbufferLogicalFunction::TemporalADisjointTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalADisjointTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalADisjointTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalADisjointTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalADisjointTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..55f4e95f0e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTCbufferLogicalFunction::TemporalADisjointTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalADisjointTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalADisjointTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalADisjointTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalADisjointTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..8f4ab3c01c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTCbufferTCbufferLogicalFunction::TemporalADisjointTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalADisjointTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalADisjointTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalADisjointTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalADisjointTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..7dddd831d5 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTGeometryLogicalFunction::TemporalADisjointTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalADisjointTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalADisjointTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalADisjointTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalADisjointTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..5173527fd2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTNpointGeometryLogicalFunction::TemporalADisjointTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalADisjointTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalADisjointTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalADisjointTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalADisjointTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..ec1295c537 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTNpointTNpointLogicalFunction::TemporalADisjointTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalADisjointTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalADisjointTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalADisjointTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalADisjointTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..69aed0913d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTPoseGeometryLogicalFunction::TemporalADisjointTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalADisjointTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalADisjointTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalADisjointTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalADisjointTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..3b2c24176c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalADisjointTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalADisjointTPoseTPoseLogicalFunction::TemporalADisjointTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalADisjointTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalADisjointTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalADisjointTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalADisjointTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalADisjointTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalADisjointTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalADisjointTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalADisjointTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalADisjointTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalADisjointTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalADisjointTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalADisjointTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.cpp index d8d5bc43c8..63e39a9392 100644 --- a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.cpp +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsGeometryLogicalFunction.cpp @@ -1,73 +1,68 @@ -#include -#include -#include -#include +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + #include #include #include -#include -#include -#include -#include -#include #include #include +#include +#include #include namespace NES { -// 4-parameter constructor for temporal-static intersection -TemporalAIntersectsGeometryLogicalFunction::TemporalAIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction staticGeometry) +TemporalAIntersectsGeometryLogicalFunction::TemporalAIntersectsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) - , isTemporal6Param(false) { parameters.reserve(4); - parameters.push_back(std::move(lon1)); - parameters.push_back(std::move(lat1)); - parameters.push_back(std::move(timestamp1)); - parameters.push_back(std::move(staticGeometry)); -} - -// 6-parameter constructor for temporal-temporal intersection -TemporalAIntersectsGeometryLogicalFunction::TemporalAIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction lon2, LogicalFunction lat2, LogicalFunction timestamp2) - : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) - , isTemporal6Param(true) -{ - parameters.reserve(6); - parameters.push_back(std::move(lon1)); - parameters.push_back(std::move(lat1)); - parameters.push_back(std::move(timestamp1)); - parameters.push_back(std::move(lon2)); - parameters.push_back(std::move(lat2)); - parameters.push_back(std::move(timestamp2)); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); } DataType TemporalAIntersectsGeometryLogicalFunction::getDataType() const { return dataType; -}; +} -LogicalFunction TemporalAIntersectsGeometryLogicalFunction::withDataType(const DataType& dataType) const +LogicalFunction TemporalAIntersectsGeometryLogicalFunction::withDataType(const DataType& newDataType) const { auto copy = *this; - copy.dataType = dataType; + copy.dataType = newDataType; return copy; -}; +} std::vector TemporalAIntersectsGeometryLogicalFunction::getChildren() const { return parameters; -}; +} LogicalFunction TemporalAIntersectsGeometryLogicalFunction::withChildren(const std::vector& children) const { - PRECONDITION(children.size() == 4 || children.size() == 6, "TemporalAIntersectsGeometryLogicalFunction requires 4 or 6 children, but got {}", children.size()); + PRECONDITION(children.size() == 4, "TemporalAIntersectsGeometryLogicalFunction requires 4 children, but got {}", children.size()); auto copy = *this; copy.parameters = children; - copy.isTemporal6Param = (children.size() == 6); return copy; -}; +} std::string_view TemporalAIntersectsGeometryLogicalFunction::getType() const { @@ -78,7 +73,7 @@ bool TemporalAIntersectsGeometryLogicalFunction::operator==(const LogicalFunctio { if (const auto* other = dynamic_cast(&rhs)) { - return parameters == other->parameters && isTemporal6Param == other->isTemporal6Param; + return parameters == other->parameters; } return false; } @@ -86,60 +81,51 @@ bool TemporalAIntersectsGeometryLogicalFunction::operator==(const LogicalFunctio std::string TemporalAIntersectsGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const { std::string args; - for (size_t i = 0; i < parameters.size(); ++i) { - if (i > 0) args += ", "; - args += parameters[i].explain(verbosity); + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); } - return fmt::format("TEMPORAL_AINTERSECTS_GEOMETRY({})", args); + return fmt::format("{}({})", NAME, args); } LogicalFunction TemporalAIntersectsGeometryLogicalFunction::withInferredDataType(const Schema& schema) const { std::vector newChildren; - for (auto& node : getChildren()) + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) { - newChildren.push_back(node.withInferredDataType(schema)); - } - - if (isTemporal6Param) { - // 6-parameter case: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - INVARIANT(newChildren[0].getDataType().isNumeric(), "lon1 must be numeric, but was: {}", newChildren[0].getDataType()); - INVARIANT(newChildren[1].getDataType().isNumeric(), "lat1 must be numeric, but was: {}", newChildren[1].getDataType()); - INVARIANT(newChildren[2].getDataType().isType(DataType::Type::UINT64), "timestamp1 must be UINT64, but was: {}", newChildren[2].getDataType()); - INVARIANT(newChildren[3].getDataType().isNumeric(), "lon2 must be numeric, but was: {}", newChildren[3].getDataType()); - INVARIANT(newChildren[4].getDataType().isNumeric(), "lat2 must be numeric, but was: {}", newChildren[4].getDataType()); - INVARIANT(newChildren[5].getDataType().isType(DataType::Type::UINT64), "timestamp2 must be UINT64, but was: {}", newChildren[5].getDataType()); - } else { - // 4-parameter case: lon1, lat1, timestamp1, static_geometry - INVARIANT(newChildren[0].getDataType().isNumeric(), "lon1 must be numeric, but was: {}", newChildren[0].getDataType()); - INVARIANT(newChildren[1].getDataType().isNumeric(), "lat1 must be numeric, but was: {}", newChildren[1].getDataType()); - INVARIANT(newChildren[2].getDataType().isType(DataType::Type::UINT64), "timestamp1 must be UINT64, but was: {}", newChildren[2].getDataType()); - INVARIANT(newChildren[3].getDataType().isType(DataType::Type::VARSIZED), "static_geometry must be VARSIZED, but was: {}", newChildren[3].getDataType()); + newChildren.emplace_back(child.withInferredDataType(schema)); } - - return this->withChildren(newChildren); + return withChildren(newChildren); } SerializableFunction TemporalAIntersectsGeometryLogicalFunction::serialize() const { - SerializableFunction serializedFunction; - serializedFunction.set_function_type(NAME); - for (const auto& param : parameters) { - serializedFunction.add_children()->CopyFrom(param.serialize()); + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); } - DataTypeSerializationUtil::serializeDataType(this->getDataType(), serializedFunction.mutable_data_type()); - return serializedFunction; + return proto; } -LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsGeometryLogicalFunction(LogicalFunctionRegistryArguments arguments) +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) { - if (arguments.children.size() == 4) { - return TemporalAIntersectsGeometryLogicalFunction(arguments.children[0], arguments.children[1], arguments.children[2], arguments.children[3]); - } else if (arguments.children.size() == 6) { - return TemporalAIntersectsGeometryLogicalFunction(arguments.children[0], arguments.children[1], arguments.children[2], arguments.children[3], arguments.children[4], arguments.children[5]); - } else { - PRECONDITION(false, "TemporalAIntersectsGeometryLogicalFunction requires 4 or 6 children, but got {}", arguments.children.size()); - } + PRECONDITION(arguments.children.size() == 4, + "TemporalAIntersectsGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalAIntersectsGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } -} \ No newline at end of file +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..efef321837 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTCbufferCbufferLogicalFunction::TemporalAIntersectsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalAIntersectsTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalAIntersectsTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalAIntersectsTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalAIntersectsTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..b4ecf5418a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTCbufferLogicalFunction::TemporalAIntersectsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAIntersectsTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalAIntersectsTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalAIntersectsTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalAIntersectsTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..03b451f801 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTCbufferTCbufferLogicalFunction::TemporalAIntersectsTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAIntersectsTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalAIntersectsTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalAIntersectsTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalAIntersectsTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..9b842b294b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTGeometryLogicalFunction::TemporalAIntersectsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAIntersectsTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalAIntersectsTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalAIntersectsTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalAIntersectsTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..80ce0a3854 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTNpointGeometryLogicalFunction::TemporalAIntersectsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAIntersectsTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalAIntersectsTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalAIntersectsTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalAIntersectsTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..a69a301c05 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTNpointTNpointLogicalFunction::TemporalAIntersectsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAIntersectsTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalAIntersectsTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalAIntersectsTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalAIntersectsTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..e152146e01 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTPoseGeometryLogicalFunction::TemporalAIntersectsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAIntersectsTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalAIntersectsTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalAIntersectsTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalAIntersectsTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..c8e82a659f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAIntersectsTPoseTPoseLogicalFunction::TemporalAIntersectsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalAIntersectsTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAIntersectsTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAIntersectsTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAIntersectsTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalAIntersectsTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAIntersectsTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAIntersectsTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAIntersectsTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAIntersectsTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAIntersectsTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalAIntersectsTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalAIntersectsTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..759c8b3f5d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesGeometryLogicalFunction::TemporalATouchesGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalATouchesGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalATouchesGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalATouchesGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalATouchesGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..4658fcfe0a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTCbufferCbufferLogicalFunction::TemporalATouchesTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalATouchesTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalATouchesTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalATouchesTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalATouchesTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..a36e1aabf2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTCbufferLogicalFunction::TemporalATouchesTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalATouchesTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalATouchesTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalATouchesTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalATouchesTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..e2603392e2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTCbufferTCbufferLogicalFunction::TemporalATouchesTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalATouchesTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalATouchesTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalATouchesTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalATouchesTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..35ab303505 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTGeometryLogicalFunction::TemporalATouchesTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalATouchesTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalATouchesTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalATouchesTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalATouchesTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..e0af8cb32e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTNpointGeometryLogicalFunction::TemporalATouchesTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalATouchesTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalATouchesTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalATouchesTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalATouchesTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..bb7257d12b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTNpointTNpointLogicalFunction::TemporalATouchesTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalATouchesTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalATouchesTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalATouchesTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalATouchesTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..e3a8a01cb0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTPoseGeometryLogicalFunction::TemporalATouchesTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalATouchesTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalATouchesTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalATouchesTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalATouchesTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..9890aa1413 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalATouchesTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalATouchesTPoseTPoseLogicalFunction::TemporalATouchesTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalATouchesTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalATouchesTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalATouchesTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalATouchesTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalATouchesTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalATouchesTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalATouchesTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalATouchesTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalATouchesTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalATouchesTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalATouchesTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalATouchesTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAtGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAtGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..78225ad55a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalAtGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalAtGeometryLogicalFunction::TemporalAtGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalAtGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalAtGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalAtGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalAtGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalAtGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalAtGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalAtGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalAtGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalAtGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalAtGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAtGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalAtGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalAtGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalAtStBoxLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalAtStBoxLogicalFunction.cpp index 8e1da044be..25f8801877 100644 --- a/nes-logical-operators/src/Functions/Meos/TemporalAtStBoxLogicalFunction.cpp +++ b/nes-logical-operators/src/Functions/Meos/TemporalAtStBoxLogicalFunction.cpp @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include #include @@ -13,33 +27,16 @@ namespace NES { TemporalAtStBoxLogicalFunction::TemporalAtStBoxLogicalFunction(LogicalFunction lon, - LogicalFunction lat, - LogicalFunction timestamp, - LogicalFunction stbox) + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) - , hasBorderParam(false) { parameters.reserve(4); parameters.push_back(std::move(lon)); parameters.push_back(std::move(lat)); parameters.push_back(std::move(timestamp)); - parameters.push_back(std::move(stbox)); -} - -TemporalAtStBoxLogicalFunction::TemporalAtStBoxLogicalFunction(LogicalFunction lon, - LogicalFunction lat, - LogicalFunction timestamp, - LogicalFunction stbox, - LogicalFunction borderInclusive) - : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) - , hasBorderParam(true) -{ - parameters.reserve(5); - parameters.push_back(std::move(lon)); - parameters.push_back(std::move(lat)); - parameters.push_back(std::move(timestamp)); - parameters.push_back(std::move(stbox)); - parameters.push_back(std::move(borderInclusive)); + parameters.push_back(std::move(geometry)); } DataType TemporalAtStBoxLogicalFunction::getDataType() const @@ -61,12 +58,9 @@ std::vector TemporalAtStBoxLogicalFunction::getChildren() const LogicalFunction TemporalAtStBoxLogicalFunction::withChildren(const std::vector& children) const { - PRECONDITION(children.size() == 4 || children.size() == 5, - "TemporalAtStBoxLogicalFunction requires 4 or 5 children, but got {}", - children.size()); + PRECONDITION(children.size() == 4, "TemporalAtStBoxLogicalFunction requires 4 children, but got {}", children.size()); auto copy = *this; copy.parameters = children; - copy.hasBorderParam = (children.size() == 5); return copy; } @@ -79,7 +73,7 @@ bool TemporalAtStBoxLogicalFunction::operator==(const LogicalFunctionConcept& rh { if (const auto* other = dynamic_cast(&rhs)) { - return parameters == other->parameters && hasBorderParam == other->hasBorderParam; + return parameters == other->parameters; } return false; } @@ -106,54 +100,32 @@ LogicalFunction TemporalAtStBoxLogicalFunction::withInferredDataType(const Schem { newChildren.emplace_back(child.withInferredDataType(schema)); } - - INVARIANT(newChildren[0].getDataType().isNumeric(), "Longitude must be numeric, but was: {}", newChildren[0].getDataType()); - INVARIANT(newChildren[1].getDataType().isNumeric(), "Latitude must be numeric, but was: {}", newChildren[1].getDataType()); - INVARIANT(newChildren[2].getDataType().isType(DataType::Type::UINT64), "Timestamp must be UINT64, but was: {}", newChildren[2].getDataType()); - INVARIANT(newChildren[3].getDataType().isType(DataType::Type::VARSIZED), "STBOX literal must be VARSIZED, but was: {}", newChildren[3].getDataType()); - if (newChildren.size() == 5) - { - INVARIANT(newChildren[4].getDataType().isType(DataType::Type::BOOLEAN), - "Border flag must be BOOL, but was: {}", - newChildren[4].getDataType()); - } - return withChildren(newChildren); } SerializableFunction TemporalAtStBoxLogicalFunction::serialize() const { - SerializableFunction serialized; - serialized.set_function_type(NAME); + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); for (const auto& child : parameters) { - serialized.add_children()->CopyFrom(child.serialize()); + proto.add_children()->CopyFrom(child.serialize()); } - DataTypeSerializationUtil::serializeDataType(getDataType(), serialized.mutable_data_type()); - return serialized; + return proto; } -LogicalFunctionRegistryReturnType -LogicalFunctionGeneratedRegistrar::RegisterTemporalAtStBoxLogicalFunction(LogicalFunctionRegistryArguments arguments) +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalAtStBoxLogicalFunction( + LogicalFunctionRegistryArguments arguments) { - if (arguments.children.size() == 4) - { - return TemporalAtStBoxLogicalFunction(arguments.children[0], - arguments.children[1], - arguments.children[2], - arguments.children[3]); - } - if (arguments.children.size() == 5) - { - return TemporalAtStBoxLogicalFunction(arguments.children[0], - arguments.children[1], - arguments.children[2], - arguments.children[3], - arguments.children[4]); - } - PRECONDITION(false, - "TemporalAtStBoxLogicalFunction requires 4 or 5 children, but got {}", + PRECONDITION(arguments.children.size() == 4, + "TemporalAtStBoxLogicalFunction requires 4 children but got {}", arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalAtStBoxLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } } // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalCmpLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalCmpLogicalFunction.cpp new file mode 100644 index 0000000000..78e90ccdc8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalCmpLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalCmpLogicalFunction::TemporalCmpLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalCmpLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalCmpLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalCmpLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalCmpLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalCmpLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalCmpLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalCmpLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalCmpLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalCmpLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalCmpLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalCmpLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalCmpLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalCmpLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.cpp new file mode 100644 index 0000000000..427ba9e1f0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalDyntimewarpDistanceLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalDyntimewarpDistanceLogicalFunction::TemporalDyntimewarpDistanceLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalDyntimewarpDistanceLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalDyntimewarpDistanceLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalDyntimewarpDistanceLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalDyntimewarpDistanceLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalDyntimewarpDistanceLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalDyntimewarpDistanceLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalDyntimewarpDistanceLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalDyntimewarpDistanceLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalDyntimewarpDistanceLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalDyntimewarpDistanceLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalDyntimewarpDistanceLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalDyntimewarpDistanceLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalDyntimewarpDistanceLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsGeometryLogicalFunction.cpp index 5ea7ddc49b..d9d917b0db 100644 --- a/nes-logical-operators/src/Functions/Meos/TemporalEContainsGeometryLogicalFunction.cpp +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsGeometryLogicalFunction.cpp @@ -1,144 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include -#include -#include -#include -#include -#include -#include -#include -#include -#include + #include #include #include -#include -#include -#include -#include #include #include +#include +#include #include -namespace NES { - -/* ─────────── constructors ─────────── */ - -TemporalEContainsGeometryLogicalFunction:: -TemporalEContainsGeometryLogicalFunction(LogicalFunction param1, - LogicalFunction param2, - LogicalFunction param3, - LogicalFunction param4) - : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) { - parameters = {std::move(param1), std::move(param2), std::move(param3), std::move(param4)}; +namespace NES +{ + +TemporalEContainsGeometryLogicalFunction::TemporalEContainsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); } -TemporalEContainsGeometryLogicalFunction:: -TemporalEContainsGeometryLogicalFunction(LogicalFunction lon1, - LogicalFunction lat1, - LogicalFunction ts1, - LogicalFunction lon2, - LogicalFunction lat2, - LogicalFunction ts2) - : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) { - parameters = {std::move(lon1), std::move(lat1), std::move(ts1), - std::move(lon2), std::move(lat2), std::move(ts2)}; +DataType TemporalEContainsGeometryLogicalFunction::getDataType() const +{ + return dataType; } -/* ─────────── boiler-plate overrides ─────────── */ - -DataType TemporalEContainsGeometryLogicalFunction::getDataType() const { return dataType; } - -LogicalFunction -TemporalEContainsGeometryLogicalFunction::withDataType(const DataType& dt) const { - auto c = *this; c.dataType = dt; return c; +LogicalFunction TemporalEContainsGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; } -std::vector -TemporalEContainsGeometryLogicalFunction::getChildren() const { return parameters; } - -LogicalFunction -TemporalEContainsGeometryLogicalFunction::withChildren(const std::vector& ch) const { - PRECONDITION(ch.size()==4 || ch.size()==6, - "TemporalEContainsGeometry expects 4 or 6 params, got {}", ch.size()); - auto c=*this; c.parameters=ch; - return c; +std::vector TemporalEContainsGeometryLogicalFunction::getChildren() const +{ + return parameters; } -std::string_view TemporalEContainsGeometryLogicalFunction::getType() const { return NAME; } +LogicalFunction TemporalEContainsGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalEContainsGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} -bool TemporalEContainsGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const { - const auto* o = dynamic_cast(&rhs); - return o && parameters==o->parameters; +std::string_view TemporalEContainsGeometryLogicalFunction::getType() const +{ + return NAME; } -std::string -TemporalEContainsGeometryLogicalFunction::explain(ExplainVerbosity v) const { - std::string a; - for(size_t i=0;i(&rhs)) + { + return parameters == other->parameters; } - return fmt::format("TEMPORAL_ECONTAINS_GEOMETRY({})", a); + return false; } -LogicalFunction -TemporalEContainsGeometryLogicalFunction::withInferredDataType(const Schema& s) const { - std::vector ch; - ch.reserve(parameters.size()); - for(auto& p: parameters) ch.push_back(p.withInferredDataType(s)); - - // light-weight checks - auto isNum = [](const DataType& dt){ return dt.isNumeric(); }; - auto isTime = [](const DataType& dt){ return dt.isType(DataType::Type::UINT64); }; - auto isStr = [](const DataType& dt){ return dt.isType(DataType::Type::VARSIZED); }; - - // Validate based on parameter count and types - if(ch.size() == 6) { - // 6-param: temporal-temporal (lon1, lat1, ts1, lon2, lat2, ts2) - INVARIANT(isNum(ch[0].getDataType()) && isNum(ch[1].getDataType()) && isTime(ch[2].getDataType()) - && isNum(ch[3].getDataType()) && isNum(ch[4].getDataType()) && isTime(ch[5].getDataType()), - "Invalid types for temporal-temporal contains"); - } else if(ch.size() == 4) { - if(isStr(ch[0].getDataType())) { - // 4-param: static-temporal (static_geom, lon, lat, ts) - INVARIANT(isStr(ch[0].getDataType()) && isNum(ch[1].getDataType()) - && isNum(ch[2].getDataType()) && isTime(ch[3].getDataType()), - "Invalid types for static-temporal contains"); - } else { - // 4-param: temporal-static (lon, lat, ts, static_geom) - INVARIANT(isNum(ch[0].getDataType()) && isNum(ch[1].getDataType()) - && isTime(ch[2].getDataType()) && isStr(ch[3].getDataType()), - "Invalid types for temporal-static contains"); +std::string TemporalEContainsGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; } - } else { - PRECONDITION(false, "TemporalEContainsGeometry expects 4 or 6 parameters, got {}", ch.size()); + args += parameters[index].explain(verbosity); } - return withChildren(ch); + return fmt::format("{}({})", NAME, args); } -SerializableFunction -TemporalEContainsGeometryLogicalFunction::serialize() const { - SerializableFunction sf; - sf.set_function_type(NAME); - for(auto& p: parameters) *sf.add_children() = p.serialize(); - DataTypeSerializationUtil::serializeDataType(dataType, sf.mutable_data_type()); - return sf; +LogicalFunction TemporalEContainsGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; } -/* ─────────── registry helper ─────────── */ -LogicalFunctionRegistryReturnType -LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsGeometryLogicalFunction( - LogicalFunctionRegistryArguments arguments){ - if(arguments.children.size()==6) - return TemporalEContainsGeometryLogicalFunction(arguments.children[0],arguments.children[1],arguments.children[2], - arguments.children[3],arguments.children[4],arguments.children[5]); - PRECONDITION(arguments.children.size()==4, - "TemporalEContainsGeometry expects 4 or 6 params, got {}", arguments.children.size()); - - // decide 4-param layout by inspecting first child’s type - // decide 4-param layout by inspecting first child's type - return TemporalEContainsGeometryLogicalFunction(arguments.children[0],arguments.children[1], - arguments.children[2],arguments.children[3]); +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalEContainsGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalEContainsGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } } // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..fad9c5c7ad --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTCbufferCbufferLogicalFunction::TemporalEContainsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalEContainsTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEContainsTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEContainsTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEContainsTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..524a54acc9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTCbufferLogicalFunction::TemporalEContainsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEContainsTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEContainsTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEContainsTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEContainsTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..fd500aa892 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTGeometryLogicalFunction::TemporalEContainsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEContainsTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEContainsTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEContainsTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEContainsTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..213e4cb9fa --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTNpointGeometryLogicalFunction::TemporalEContainsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEContainsTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalEContainsTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalEContainsTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalEContainsTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..4e1321c7b2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTNpointTNpointLogicalFunction::TemporalEContainsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEContainsTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEContainsTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEContainsTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEContainsTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..a8a961578e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTPoseGeometryLogicalFunction::TemporalEContainsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEContainsTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEContainsTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEContainsTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEContainsTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..f66a1b707c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEContainsTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEContainsTPoseTPoseLogicalFunction::TemporalEContainsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEContainsTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEContainsTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEContainsTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEContainsTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalEContainsTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEContainsTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEContainsTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEContainsTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEContainsTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEContainsTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalEContainsTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalEContainsTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..81aa2b3517 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversGeometryLogicalFunction::TemporalECoversGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalECoversGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalECoversGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalECoversGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalECoversGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..dfc5d19eb3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTCbufferCbufferLogicalFunction::TemporalECoversTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalECoversTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalECoversTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalECoversTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalECoversTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..804ae61c1a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTCbufferLogicalFunction::TemporalECoversTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalECoversTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalECoversTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalECoversTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalECoversTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..af07fbd259 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTCbufferTCbufferLogicalFunction::TemporalECoversTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalECoversTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalECoversTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalECoversTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalECoversTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..403a0ec62c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTGeometryLogicalFunction::TemporalECoversTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalECoversTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalECoversTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalECoversTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalECoversTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..970db8715f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTNpointGeometryLogicalFunction::TemporalECoversTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalECoversTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalECoversTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalECoversTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalECoversTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..70503741a2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTNpointTNpointLogicalFunction::TemporalECoversTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalECoversTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalECoversTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalECoversTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalECoversTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..5b5099171d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTPoseGeometryLogicalFunction::TemporalECoversTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalECoversTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalECoversTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalECoversTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalECoversTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..a046acb75e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalECoversTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalECoversTPoseTPoseLogicalFunction::TemporalECoversTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalECoversTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalECoversTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalECoversTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalECoversTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalECoversTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalECoversTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalECoversTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalECoversTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalECoversTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalECoversTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalECoversTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalECoversTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalECoversTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.cpp index b3e95e4e76..af228c39ea 100644 --- a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.cpp +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinGeometryLogicalFunction.cpp @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include #include @@ -13,10 +27,10 @@ namespace NES { TemporalEDWithinGeometryLogicalFunction::TemporalEDWithinGeometryLogicalFunction(LogicalFunction lon, - LogicalFunction lat, - LogicalFunction timestamp, - LogicalFunction geometry, - LogicalFunction distance) + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) { parameters.reserve(5); @@ -24,7 +38,7 @@ TemporalEDWithinGeometryLogicalFunction::TemporalEDWithinGeometryLogicalFunction parameters.push_back(std::move(lat)); parameters.push_back(std::move(timestamp)); parameters.push_back(std::move(geometry)); - parameters.push_back(std::move(distance)); + parameters.push_back(std::move(dist)); } DataType TemporalEDWithinGeometryLogicalFunction::getDataType() const @@ -88,39 +102,33 @@ LogicalFunction TemporalEDWithinGeometryLogicalFunction::withInferredDataType(co { newChildren.emplace_back(child.withInferredDataType(schema)); } - - INVARIANT(newChildren[0].getDataType().isNumeric(), "Longitude must be numeric, but was: {}", newChildren[0].getDataType()); - INVARIANT(newChildren[1].getDataType().isNumeric(), "Latitude must be numeric, but was: {}", newChildren[1].getDataType()); - INVARIANT(newChildren[2].getDataType().isType(DataType::Type::UINT64), "Timestamp must be UINT64, but was: {}", newChildren[2].getDataType()); - INVARIANT(newChildren[3].getDataType().isType(DataType::Type::VARSIZED), "Geometry literal must be VARSIZED, but was: {}", newChildren[3].getDataType()); - INVARIANT(newChildren[4].getDataType().isNumeric(), "Distance must be numeric, but was: {}", newChildren[4].getDataType()); - return withChildren(newChildren); } SerializableFunction TemporalEDWithinGeometryLogicalFunction::serialize() const { - SerializableFunction serialized; - serialized.set_function_type(NAME); + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); for (const auto& child : parameters) { - serialized.add_children()->CopyFrom(child.serialize()); + proto.add_children()->CopyFrom(child.serialize()); } - DataTypeSerializationUtil::serializeDataType(getDataType(), serialized.mutable_data_type()); - return serialized; + return proto; } -LogicalFunctionRegistryReturnType -LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinGeometryLogicalFunction(LogicalFunctionRegistryArguments arguments) +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) { PRECONDITION(arguments.children.size() == 5, - "TemporalEDWithinGeometryLogicalFunction requires 5 children, but got {}", + "TemporalEDWithinGeometryLogicalFunction requires 5 children but got {}", arguments.children.size()); - return TemporalEDWithinGeometryLogicalFunction(arguments.children[0], - arguments.children[1], - arguments.children[2], - arguments.children[3], - arguments.children[4]); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEDWithinGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); } } // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..9ce944034e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTCbufferCbufferLogicalFunction::TemporalEDWithinTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEDWithinTCbufferCbufferLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEDWithinTCbufferCbufferLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEDWithinTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..554a1d78d0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTCbufferGeometryLogicalFunction::TemporalEDWithinTCbufferGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTCbufferGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTCbufferGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTCbufferGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTCbufferGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEDWithinTCbufferGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTCbufferGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTCbufferGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTCbufferGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTCbufferGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTCbufferGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTCbufferGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEDWithinTCbufferGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEDWithinTCbufferGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..8a5a4b2dcc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTCbufferTCbufferLogicalFunction::TemporalEDWithinTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(9); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "TemporalEDWithinTCbufferTCbufferLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "TemporalEDWithinTCbufferTCbufferLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return TemporalEDWithinTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..9b97bf4afe --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTGeometryLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTGeometryLogicalFunction::TemporalEDWithinTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(7); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "TemporalEDWithinTGeometryLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "TemporalEDWithinTGeometryLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return TemporalEDWithinTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..8306e04863 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTNpointGeometryLogicalFunction::TemporalEDWithinTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEDWithinTNpointGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEDWithinTNpointGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEDWithinTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..68a8f03ecb --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,140 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTNpointTNpointLogicalFunction::TemporalEDWithinTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(7); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 7, "TemporalEDWithinTNpointTNpointLogicalFunction requires 7 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 7, + "TemporalEDWithinTNpointTNpointLogicalFunction requires 7 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + return TemporalEDWithinTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..38173e13e2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTPoseGeometryLogicalFunction::TemporalEDWithinTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEDWithinTPoseGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEDWithinTPoseGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEDWithinTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..0ee9617c1d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,146 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDWithinTPoseTPoseLogicalFunction::TemporalEDWithinTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB, + LogicalFunction dist) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(9); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); + parameters.push_back(std::move(dist)); +} + +DataType TemporalEDWithinTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDWithinTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDWithinTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDWithinTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 9, "TemporalEDWithinTPoseTPoseLogicalFunction requires 9 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDWithinTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDWithinTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDWithinTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDWithinTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDWithinTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 9, + "TemporalEDWithinTPoseTPoseLogicalFunction requires 9 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + auto arg8 = std::move(arguments.children[8]); + return TemporalEDWithinTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..29e31baade --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointGeometryLogicalFunction::TemporalEDisjointGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEDisjointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalEDisjointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalEDisjointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalEDisjointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..d0a9d4f42f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTCbufferCbufferLogicalFunction::TemporalEDisjointTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalEDisjointTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEDisjointTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEDisjointTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEDisjointTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..e6a286c286 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTCbufferLogicalFunction::TemporalEDisjointTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEDisjointTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEDisjointTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEDisjointTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEDisjointTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..454a19f2ac --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTGeometryLogicalFunction::TemporalEDisjointTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEDisjointTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEDisjointTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEDisjointTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEDisjointTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..cbd9b1a6d0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTNpointGeometryLogicalFunction::TemporalEDisjointTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEDisjointTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalEDisjointTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalEDisjointTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalEDisjointTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..be7e1341a9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTNpointTNpointLogicalFunction::TemporalEDisjointTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEDisjointTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEDisjointTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEDisjointTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEDisjointTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..34d0974c49 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTPoseGeometryLogicalFunction::TemporalEDisjointTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEDisjointTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEDisjointTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEDisjointTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEDisjointTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..4f6d937e17 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEDisjointTPoseTPoseLogicalFunction::TemporalEDisjointTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEDisjointTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEDisjointTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEDisjointTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEDisjointTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalEDisjointTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEDisjointTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEDisjointTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEDisjointTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEDisjointTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEDisjointTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalEDisjointTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalEDisjointTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..5c9410391a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsGeometryLogicalFunction::TemporalEIntersectsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEIntersectsGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalEIntersectsGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalEIntersectsGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalEIntersectsGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..ef7ae19ded --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTCbufferCbufferLogicalFunction::TemporalEIntersectsTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalEIntersectsTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEIntersectsTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEIntersectsTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEIntersectsTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..24706e36ad --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTCbufferLogicalFunction::TemporalEIntersectsTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEIntersectsTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEIntersectsTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEIntersectsTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEIntersectsTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..b156bc2db6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTCbufferTCbufferLogicalFunction::TemporalEIntersectsTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEIntersectsTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalEIntersectsTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalEIntersectsTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalEIntersectsTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..51bdd9f33b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTGeometryLogicalFunction::TemporalEIntersectsTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEIntersectsTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEIntersectsTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEIntersectsTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEIntersectsTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..5860977c20 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTNpointGeometryLogicalFunction::TemporalEIntersectsTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEIntersectsTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalEIntersectsTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalEIntersectsTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalEIntersectsTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..dff7a41b5d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTNpointTNpointLogicalFunction::TemporalEIntersectsTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEIntersectsTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEIntersectsTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEIntersectsTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEIntersectsTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..124a9204ac --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTPoseGeometryLogicalFunction::TemporalEIntersectsTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalEIntersectsTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalEIntersectsTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalEIntersectsTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalEIntersectsTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..75a8a8665c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEIntersectsTPoseTPoseLogicalFunction::TemporalEIntersectsTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEIntersectsTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEIntersectsTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEIntersectsTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEIntersectsTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalEIntersectsTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEIntersectsTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEIntersectsTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEIntersectsTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEIntersectsTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEIntersectsTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalEIntersectsTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalEIntersectsTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..fc0fbc2ddd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesGeometryLogicalFunction::TemporalETouchesGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalETouchesGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalETouchesGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalETouchesGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalETouchesGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..90ce7f4c22 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTCbufferCbufferLogicalFunction::TemporalETouchesTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalETouchesTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalETouchesTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalETouchesTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalETouchesTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..b9d0dda919 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTCbufferLogicalFunction::TemporalETouchesTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalETouchesTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalETouchesTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalETouchesTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalETouchesTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..e123b01fd8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTCbufferTCbufferLogicalFunction::TemporalETouchesTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalETouchesTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalETouchesTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalETouchesTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalETouchesTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..ad25f0f20c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTGeometryLogicalFunction::TemporalETouchesTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalETouchesTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalETouchesTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalETouchesTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalETouchesTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..09821a8cb3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTNpointGeometryLogicalFunction::TemporalETouchesTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalETouchesTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalETouchesTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalETouchesTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalETouchesTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..b3d8b8c0ba --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTNpointTNpointLogicalFunction::TemporalETouchesTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalETouchesTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalETouchesTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalETouchesTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalETouchesTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..cf0f71eb87 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTPoseGeometryLogicalFunction::TemporalETouchesTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalETouchesTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalETouchesTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalETouchesTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalETouchesTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..9fbc60bb0c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalETouchesTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalETouchesTPoseTPoseLogicalFunction::TemporalETouchesTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalETouchesTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalETouchesTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalETouchesTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalETouchesTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalETouchesTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalETouchesTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalETouchesTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalETouchesTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalETouchesTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalETouchesTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalETouchesTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalETouchesTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalEqLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalEqLogicalFunction.cpp new file mode 100644 index 0000000000..c7e441fa30 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalEqLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalEqLogicalFunction::TemporalEqLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalEqLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalEqLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalEqLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalEqLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalEqLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalEqLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalEqLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalEqLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalEqLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalEqLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalEqLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalEqLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalEqLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalFrechetDistanceLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalFrechetDistanceLogicalFunction.cpp new file mode 100644 index 0000000000..9edc9f393f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalFrechetDistanceLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalFrechetDistanceLogicalFunction::TemporalFrechetDistanceLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalFrechetDistanceLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalFrechetDistanceLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalFrechetDistanceLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalFrechetDistanceLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalFrechetDistanceLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalFrechetDistanceLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalFrechetDistanceLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalFrechetDistanceLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalFrechetDistanceLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalFrechetDistanceLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalFrechetDistanceLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalFrechetDistanceLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalFrechetDistanceLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalGeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalGeLogicalFunction.cpp new file mode 100644 index 0000000000..af2d9ee4da --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalGeLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalGeLogicalFunction::TemporalGeLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalGeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalGeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalGeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalGeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalGeLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalGeLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalGeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalGeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalGeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalGeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalGeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalGeLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalGeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalGtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalGtLogicalFunction.cpp new file mode 100644 index 0000000000..47b447832d --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalGtLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalGtLogicalFunction::TemporalGtLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalGtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalGtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalGtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalGtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalGtLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalGtLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalGtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalGtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalGtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalGtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalGtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalGtLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalGtLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.cpp new file mode 100644 index 0000000000..4f50681f1f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalHausdorffDistanceLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalHausdorffDistanceLogicalFunction::TemporalHausdorffDistanceLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalHausdorffDistanceLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalHausdorffDistanceLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalHausdorffDistanceLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalHausdorffDistanceLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalHausdorffDistanceLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalHausdorffDistanceLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalHausdorffDistanceLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalHausdorffDistanceLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalHausdorffDistanceLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalHausdorffDistanceLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalHausdorffDistanceLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalHausdorffDistanceLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalHausdorffDistanceLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.cpp index 7a31c1d89b..139d186e74 100644 --- a/nes-logical-operators/src/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.cpp +++ b/nes-logical-operators/src/Functions/Meos/TemporalIntersectsGeometryLogicalFunction.cpp @@ -1,74 +1,68 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include -#include -#include -#include -#include #include #include #include -#include -#include -#include -#include -#include #include #include +#include +#include #include namespace NES { -// 4-parameter constructor for temporal-static intersection -TemporalIntersectsGeometryLogicalFunction::TemporalIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction staticGeometry) +TemporalIntersectsGeometryLogicalFunction::TemporalIntersectsGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) - , isTemporal6Param(false) { parameters.reserve(4); - parameters.push_back(std::move(lon1)); - parameters.push_back(std::move(lat1)); - parameters.push_back(std::move(timestamp1)); - parameters.push_back(std::move(staticGeometry)); -} - -// 6-parameter constructor for temporal-temporal intersection -TemporalIntersectsGeometryLogicalFunction::TemporalIntersectsGeometryLogicalFunction(LogicalFunction lon1, LogicalFunction lat1, LogicalFunction timestamp1, LogicalFunction lon2, LogicalFunction lat2, LogicalFunction timestamp2) - : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) - , isTemporal6Param(true) -{ - parameters.reserve(6); - parameters.push_back(std::move(lon1)); - parameters.push_back(std::move(lat1)); - parameters.push_back(std::move(timestamp1)); - parameters.push_back(std::move(lon2)); - parameters.push_back(std::move(lat2)); - parameters.push_back(std::move(timestamp2)); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); } DataType TemporalIntersectsGeometryLogicalFunction::getDataType() const { return dataType; -}; +} -LogicalFunction TemporalIntersectsGeometryLogicalFunction::withDataType(const DataType& dataType) const +LogicalFunction TemporalIntersectsGeometryLogicalFunction::withDataType(const DataType& newDataType) const { auto copy = *this; - copy.dataType = dataType; + copy.dataType = newDataType; return copy; -}; +} std::vector TemporalIntersectsGeometryLogicalFunction::getChildren() const { return parameters; -}; +} LogicalFunction TemporalIntersectsGeometryLogicalFunction::withChildren(const std::vector& children) const { - PRECONDITION(children.size() == 4 || children.size() == 6, "TemporalIntersectsGeometryLogicalFunction requires 4 or 6 children, but got {}", children.size()); + PRECONDITION(children.size() == 4, "TemporalIntersectsGeometryLogicalFunction requires 4 children, but got {}", children.size()); auto copy = *this; copy.parameters = children; - copy.isTemporal6Param = (children.size() == 6); return copy; -}; +} std::string_view TemporalIntersectsGeometryLogicalFunction::getType() const { @@ -79,7 +73,7 @@ bool TemporalIntersectsGeometryLogicalFunction::operator==(const LogicalFunction { if (const auto* other = dynamic_cast(&rhs)) { - return parameters == other->parameters && isTemporal6Param == other->isTemporal6Param; + return parameters == other->parameters; } return false; } @@ -87,60 +81,51 @@ bool TemporalIntersectsGeometryLogicalFunction::operator==(const LogicalFunction std::string TemporalIntersectsGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const { std::string args; - for (size_t i = 0; i < parameters.size(); ++i) { - if (i > 0) args += ", "; - args += parameters[i].explain(verbosity); + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); } - return fmt::format("TEMPORAL_INTERSECTS_GEOMETRY({})", args); + return fmt::format("{}({})", NAME, args); } LogicalFunction TemporalIntersectsGeometryLogicalFunction::withInferredDataType(const Schema& schema) const { std::vector newChildren; - for (auto& node : getChildren()) + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) { - newChildren.push_back(node.withInferredDataType(schema)); - } - - if (isTemporal6Param) { - // 6-parameter case: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - INVARIANT(newChildren[0].getDataType().isNumeric(), "lon1 must be numeric, but was: {}", newChildren[0].getDataType()); - INVARIANT(newChildren[1].getDataType().isNumeric(), "lat1 must be numeric, but was: {}", newChildren[1].getDataType()); - INVARIANT(newChildren[2].getDataType().isType(DataType::Type::UINT64), "timestamp1 must be UINT64, but was: {}", newChildren[2].getDataType()); - INVARIANT(newChildren[3].getDataType().isNumeric(), "lon2 must be numeric, but was: {}", newChildren[3].getDataType()); - INVARIANT(newChildren[4].getDataType().isNumeric(), "lat2 must be numeric, but was: {}", newChildren[4].getDataType()); - INVARIANT(newChildren[5].getDataType().isType(DataType::Type::UINT64), "timestamp2 must be UINT64, but was: {}", newChildren[5].getDataType()); - } else { - // 4-parameter case: lon1, lat1, timestamp1, static_geometry - INVARIANT(newChildren[0].getDataType().isNumeric(), "lon1 must be numeric, but was: {}", newChildren[0].getDataType()); - INVARIANT(newChildren[1].getDataType().isNumeric(), "lat1 must be numeric, but was: {}", newChildren[1].getDataType()); - INVARIANT(newChildren[2].getDataType().isType(DataType::Type::UINT64), "timestamp1 must be UINT64, but was: {}", newChildren[2].getDataType()); - INVARIANT(newChildren[3].getDataType().isType(DataType::Type::VARSIZED), "static_geometry must be VARSIZED, but was: {}", newChildren[3].getDataType()); + newChildren.emplace_back(child.withInferredDataType(schema)); } - - return this->withChildren(newChildren); + return withChildren(newChildren); } SerializableFunction TemporalIntersectsGeometryLogicalFunction::serialize() const { - SerializableFunction serializedFunction; - serializedFunction.set_function_type(NAME); - for (const auto& param : parameters) { - serializedFunction.add_children()->CopyFrom(param.serialize()); + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); } - DataTypeSerializationUtil::serializeDataType(this->getDataType(), serializedFunction.mutable_data_type()); - return serializedFunction; + return proto; } -LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalIntersectsGeometryLogicalFunction(LogicalFunctionRegistryArguments arguments) +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalIntersectsGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) { - if (arguments.children.size() == 4) { - return TemporalIntersectsGeometryLogicalFunction(arguments.children[0], arguments.children[1], arguments.children[2], arguments.children[3]); - } else if (arguments.children.size() == 6) { - return TemporalIntersectsGeometryLogicalFunction(arguments.children[0], arguments.children[1], arguments.children[2], arguments.children[3], arguments.children[4], arguments.children[5]); - } else { - PRECONDITION(false, "TemporalIntersectsGeometryLogicalFunction requires 4 or 6 children, but got {}", arguments.children.size()); - } + PRECONDITION(arguments.children.size() == 4, + "TemporalIntersectsGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalIntersectsGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } -} \ No newline at end of file +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalLeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalLeLogicalFunction.cpp new file mode 100644 index 0000000000..a60c94919c --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalLeLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalLeLogicalFunction::TemporalLeLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalLeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalLeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalLeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalLeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalLeLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalLeLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalLeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalLeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalLeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalLeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalLeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalLeLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalLeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalLtLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalLtLogicalFunction.cpp new file mode 100644 index 0000000000..a1eb89102e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalLtLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalLtLogicalFunction::TemporalLtLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalLtLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalLtLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalLtLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalLtLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalLtLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalLtLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalLtLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalLtLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalLtLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalLtLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalLtLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalLtLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalLtLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalMinusGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalMinusGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..cf8e3098d7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalMinusGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalMinusGeometryLogicalFunction::TemporalMinusGeometryLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalMinusGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalMinusGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalMinusGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalMinusGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalMinusGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalMinusGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalMinusGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalMinusGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalMinusGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalMinusGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalMinusGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalMinusGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalMinusGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADFloatScalarLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADFloatScalarLogicalFunction.cpp new file mode 100644 index 0000000000..3ef72a3ad1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADFloatScalarLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADFloatScalarLogicalFunction::TemporalNADFloatScalarLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType TemporalNADFloatScalarLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADFloatScalarLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADFloatScalarLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADFloatScalarLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TemporalNADFloatScalarLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADFloatScalarLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADFloatScalarLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADFloatScalarLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADFloatScalarLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADFloatScalarLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADFloatScalarLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TemporalNADFloatScalarLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TemporalNADFloatScalarLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..74217bdcb7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADGeometryLogicalFunction::TemporalNADGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalNADGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalNADGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalNADGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADIntScalarLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADIntScalarLogicalFunction.cpp new file mode 100644 index 0000000000..8302682a49 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADIntScalarLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADIntScalarLogicalFunction::TemporalNADIntScalarLogicalFunction(LogicalFunction value, + LogicalFunction threshold, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(threshold)); + parameters.push_back(std::move(ts)); +} + +DataType TemporalNADIntScalarLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADIntScalarLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADIntScalarLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADIntScalarLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TemporalNADIntScalarLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADIntScalarLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADIntScalarLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADIntScalarLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADIntScalarLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADIntScalarLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADIntScalarLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TemporalNADIntScalarLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TemporalNADIntScalarLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..97d925dbe3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTCbufferCbufferLogicalFunction::TemporalNADTCbufferCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction cbufLit) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(cbufLit)); +} + +DataType TemporalNADTCbufferCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTCbufferCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTCbufferCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTCbufferCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalNADTCbufferCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTCbufferCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTCbufferCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTCbufferCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTCbufferCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTCbufferCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTCbufferCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalNADTCbufferCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalNADTCbufferCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..bdafea62e3 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTCbufferLogicalFunction::TemporalNADTCbufferLogicalFunction(LogicalFunction lon, + LogicalFunction lat, + LogicalFunction radius, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(lon)); + parameters.push_back(std::move(lat)); + parameters.push_back(std::move(radius)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalNADTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalNADTCbufferLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalNADTCbufferLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalNADTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.cpp new file mode 100644 index 0000000000..fc3ef8e623 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTCbufferTCbufferLogicalFunction::TemporalNADTCbufferTCbufferLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction radiusA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction radiusB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(radiusA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(radiusB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADTCbufferTCbufferLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTCbufferTCbufferLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTCbufferTCbufferLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTCbufferTCbufferLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalNADTCbufferTCbufferLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTCbufferTCbufferLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTCbufferTCbufferLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTCbufferTCbufferLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTCbufferTCbufferLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTCbufferTCbufferLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTCbufferTCbufferLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalNADTCbufferTCbufferLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalNADTCbufferTCbufferLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTFloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTFloatLogicalFunction.cpp new file mode 100644 index 0000000000..6c9340c5ec --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTFloatLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTFloatLogicalFunction::TemporalNADTFloatLogicalFunction(LogicalFunction valueA, + LogicalFunction tsA, + LogicalFunction valueB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(valueA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(valueB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADTFloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTFloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTFloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTFloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalNADTFloatLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTFloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTFloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTFloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTFloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTFloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTFloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalNADTFloatLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalNADTFloatLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..60ca7071f7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTGeometryLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTGeometryLogicalFunction::TemporalNADTGeometryLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADTGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalNADTGeometryLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalNADTGeometryLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalNADTGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTIntLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTIntLogicalFunction.cpp new file mode 100644 index 0000000000..42d47581e6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTIntLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTIntLogicalFunction::TemporalNADTIntLogicalFunction(LogicalFunction valueA, + LogicalFunction tsA, + LogicalFunction valueB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(valueA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(valueB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADTIntLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTIntLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTIntLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTIntLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalNADTIntLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTIntLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTIntLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTIntLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTIntLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTIntLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTIntLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalNADTIntLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalNADTIntLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..dc09df6d3f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTNpointGeometryLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTNpointGeometryLogicalFunction::TemporalNADTNpointGeometryLogicalFunction(LogicalFunction rid, + LogicalFunction fraction, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(fraction)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalNADTNpointGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTNpointGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTNpointGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTNpointGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TemporalNADTNpointGeometryLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTNpointGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTNpointGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTNpointGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTNpointGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTNpointGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTNpointGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TemporalNADTNpointGeometryLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TemporalNADTNpointGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.cpp new file mode 100644 index 0000000000..d2e91c4560 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTNpointTNpointLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTNpointTNpointLogicalFunction::TemporalNADTNpointTNpointLogicalFunction(LogicalFunction ridA, + LogicalFunction fractionA, + LogicalFunction tsA, + LogicalFunction ridB, + LogicalFunction fractionB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(6); + parameters.push_back(std::move(ridA)); + parameters.push_back(std::move(fractionA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(ridB)); + parameters.push_back(std::move(fractionB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADTNpointTNpointLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTNpointTNpointLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTNpointTNpointLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTNpointTNpointLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalNADTNpointTNpointLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTNpointTNpointLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTNpointTNpointLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTNpointTNpointLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTNpointTNpointLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTNpointTNpointLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTNpointTNpointLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalNADTNpointTNpointLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalNADTNpointTNpointLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.cpp new file mode 100644 index 0000000000..2749835251 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTPoseGeometryLogicalFunction.cpp @@ -0,0 +1,134 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTPoseGeometryLogicalFunction::TemporalNADTPoseGeometryLogicalFunction(LogicalFunction x, + LogicalFunction y, + LogicalFunction theta, + LogicalFunction timestamp, + LogicalFunction geometry) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(5); + parameters.push_back(std::move(x)); + parameters.push_back(std::move(y)); + parameters.push_back(std::move(theta)); + parameters.push_back(std::move(timestamp)); + parameters.push_back(std::move(geometry)); +} + +DataType TemporalNADTPoseGeometryLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTPoseGeometryLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTPoseGeometryLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTPoseGeometryLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 5, "TemporalNADTPoseGeometryLogicalFunction requires 5 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTPoseGeometryLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTPoseGeometryLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTPoseGeometryLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTPoseGeometryLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTPoseGeometryLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTPoseGeometryLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 5, + "TemporalNADTPoseGeometryLogicalFunction requires 5 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + return TemporalNADTPoseGeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.cpp new file mode 100644 index 0000000000..b7a47f6625 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNADTPoseTPoseLogicalFunction.cpp @@ -0,0 +1,143 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNADTPoseTPoseLogicalFunction::TemporalNADTPoseTPoseLogicalFunction(LogicalFunction xA, + LogicalFunction yA, + LogicalFunction thetaA, + LogicalFunction tsA, + LogicalFunction xB, + LogicalFunction yB, + LogicalFunction thetaB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(8); + parameters.push_back(std::move(xA)); + parameters.push_back(std::move(yA)); + parameters.push_back(std::move(thetaA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(xB)); + parameters.push_back(std::move(yB)); + parameters.push_back(std::move(thetaB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNADTPoseTPoseLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNADTPoseTPoseLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNADTPoseTPoseLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNADTPoseTPoseLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 8, "TemporalNADTPoseTPoseLogicalFunction requires 8 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNADTPoseTPoseLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNADTPoseTPoseLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNADTPoseTPoseLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNADTPoseTPoseLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNADTPoseTPoseLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNADTPoseTPoseLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 8, + "TemporalNADTPoseTPoseLogicalFunction requires 8 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + auto arg6 = std::move(arguments.children[6]); + auto arg7 = std::move(arguments.children[7]); + return TemporalNADTPoseTPoseLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalNeLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalNeLogicalFunction.cpp new file mode 100644 index 0000000000..99e609b89b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalNeLogicalFunction.cpp @@ -0,0 +1,137 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalNeLogicalFunction::TemporalNeLogicalFunction(LogicalFunction lonA, + LogicalFunction latA, + LogicalFunction tsA, + LogicalFunction lonB, + LogicalFunction latB, + LogicalFunction tsB) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(6); + parameters.push_back(std::move(lonA)); + parameters.push_back(std::move(latA)); + parameters.push_back(std::move(tsA)); + parameters.push_back(std::move(lonB)); + parameters.push_back(std::move(latB)); + parameters.push_back(std::move(tsB)); +} + +DataType TemporalNeLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalNeLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalNeLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalNeLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 6, "TemporalNeLogicalFunction requires 6 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalNeLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalNeLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalNeLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalNeLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalNeLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalNeLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 6, + "TemporalNeLogicalFunction requires 6 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + auto arg4 = std::move(arguments.children[4]); + auto arg5 = std::move(arguments.children[5]); + return TemporalNeLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TemporalRoundLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TemporalRoundLogicalFunction.cpp new file mode 100644 index 0000000000..7d59b14f59 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TemporalRoundLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TemporalRoundLogicalFunction::TemporalRoundLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TemporalRoundLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TemporalRoundLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TemporalRoundLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TemporalRoundLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TemporalRoundLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TemporalRoundLogicalFunction::getType() const +{ + return NAME; +} + +bool TemporalRoundLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TemporalRoundLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TemporalRoundLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TemporalRoundLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTemporalRoundLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TemporalRoundLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TemporalRoundLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TeqBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..46c3588397 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TeqBoolTboolLogicalFunction::TeqBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TeqBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TeqBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TeqBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TeqBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TeqTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TeqTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..6209caa3e1 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TeqTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TeqTboolBoolLogicalFunction::TeqTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TeqTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TeqTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TeqTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TeqTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TeqTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TeqTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool TeqTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TeqTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TeqTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TeqTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTeqTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TeqTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TeqTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TextInitcapLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TextInitcapLogicalFunction.cpp new file mode 100644 index 0000000000..5a1186c878 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TextInitcapLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TextInitcapLogicalFunction::TextInitcapLogicalFunction(LogicalFunction str) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(str)); +} + +DataType TextInitcapLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TextInitcapLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TextInitcapLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TextInitcapLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "TextInitcapLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TextInitcapLogicalFunction::getType() const +{ + return NAME; +} + +bool TextInitcapLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TextInitcapLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TextInitcapLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TextInitcapLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTextInitcapLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "TextInitcapLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return TextInitcapLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TextLowerLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TextLowerLogicalFunction.cpp new file mode 100644 index 0000000000..7ad983dece --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TextLowerLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TextLowerLogicalFunction::TextLowerLogicalFunction(LogicalFunction str) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(str)); +} + +DataType TextLowerLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TextLowerLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TextLowerLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TextLowerLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "TextLowerLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TextLowerLogicalFunction::getType() const +{ + return NAME; +} + +bool TextLowerLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TextLowerLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TextLowerLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TextLowerLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTextLowerLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "TextLowerLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return TextLowerLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TextUpperLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TextUpperLogicalFunction.cpp new file mode 100644 index 0000000000..132ed502c6 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TextUpperLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TextUpperLogicalFunction::TextUpperLogicalFunction(LogicalFunction str) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(1); + parameters.push_back(std::move(str)); +} + +DataType TextUpperLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TextUpperLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TextUpperLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TextUpperLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "TextUpperLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TextUpperLogicalFunction::getType() const +{ + return NAME; +} + +bool TextUpperLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TextUpperLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TextUpperLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TextUpperLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTextUpperLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "TextUpperLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return TextUpperLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TextcatTextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TextcatTextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..36958da659 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TextcatTextTtextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TextcatTextTtextLogicalFunction::TextcatTextTtextLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TextcatTextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TextcatTextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TextcatTextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TextcatTextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TextcatTextTtextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TextcatTextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TextcatTextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TextcatTextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TextcatTextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TextcatTextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTextcatTextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TextcatTextTtextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TextcatTextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TextcatTtextTextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TextcatTtextTextLogicalFunction.cpp new file mode 100644 index 0000000000..e49d2bf969 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TextcatTtextTextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TextcatTtextTextLogicalFunction::TextcatTtextTextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TextcatTtextTextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TextcatTtextTextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TextcatTtextTextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TextcatTtextTextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TextcatTtextTextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TextcatTtextTextLogicalFunction::getType() const +{ + return NAME; +} + +bool TextcatTtextTextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TextcatTtextTextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TextcatTtextTextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TextcatTtextTextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTextcatTtextTextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TextcatTtextTextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TextcatTtextTextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TextcatTtextTtextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TextcatTtextTtextLogicalFunction.cpp new file mode 100644 index 0000000000..d3249b6131 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TextcatTtextTtextLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TextcatTtextTtextLogicalFunction::TextcatTtextTtextLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction tval0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(4); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(tval0)); + parameters.push_back(std::move(ts0)); +} + +DataType TextcatTtextTtextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TextcatTtextTtextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TextcatTtextTtextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TextcatTtextTtextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TextcatTtextTtextLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TextcatTtextTtextLogicalFunction::getType() const +{ + return NAME; +} + +bool TextcatTtextTtextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TextcatTtextTtextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TextcatTtextTtextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TextcatTtextTtextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTextcatTtextTtextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TextcatTtextTtextLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TextcatTtextTtextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatCeilLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatCeilLogicalFunction.cpp new file mode 100644 index 0000000000..0de1c71bea --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatCeilLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatCeilLogicalFunction::TfloatCeilLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatCeilLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatCeilLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatCeilLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatCeilLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatCeilLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatCeilLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatCeilLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatCeilLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatCeilLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatCeilLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatCeilLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatCeilLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatCeilLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatExpLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatExpLogicalFunction.cpp new file mode 100644 index 0000000000..33234e797f --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatExpLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatExpLogicalFunction::TfloatExpLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatExpLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatExpLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatExpLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatExpLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatExpLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatExpLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatExpLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatExpLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatExpLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatExpLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatExpLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatExpLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatExpLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatFloorLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatFloorLogicalFunction.cpp new file mode 100644 index 0000000000..7fe9ee08fc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatFloorLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatFloorLogicalFunction::TfloatFloorLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatFloorLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatFloorLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatFloorLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatFloorLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatFloorLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatFloorLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatFloorLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatFloorLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatFloorLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatFloorLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatFloorLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatFloorLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatFloorLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatLnLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatLnLogicalFunction.cpp new file mode 100644 index 0000000000..b07ad8e2d4 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatLnLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatLnLogicalFunction::TfloatLnLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatLnLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatLnLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatLnLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatLnLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatLnLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatLnLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatLnLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatLnLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatLnLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatLnLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatLnLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatLnLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatLnLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatLog10LogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatLog10LogicalFunction.cpp new file mode 100644 index 0000000000..3e438772be --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatLog10LogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatLog10LogicalFunction::TfloatLog10LogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatLog10LogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatLog10LogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatLog10LogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatLog10LogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatLog10LogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatLog10LogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatLog10LogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatLog10LogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatLog10LogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatLog10LogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatLog10LogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatLog10LogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatLog10LogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatRadiansLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatRadiansLogicalFunction.cpp new file mode 100644 index 0000000000..74d5f2d0cc --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatRadiansLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatRadiansLogicalFunction::TfloatRadiansLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatRadiansLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatRadiansLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatRadiansLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatRadiansLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatRadiansLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatRadiansLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatRadiansLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatRadiansLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatRadiansLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatRadiansLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatRadiansLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatRadiansLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatRadiansLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatScaleValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatScaleValueLogicalFunction.cpp new file mode 100644 index 0000000000..296b714674 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatScaleValueLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatScaleValueLogicalFunction::TfloatScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TfloatScaleValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatScaleValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatScaleValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatScaleValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TfloatScaleValueLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatScaleValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatScaleValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatScaleValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatScaleValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatScaleValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatScaleValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TfloatScaleValueLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TfloatScaleValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatShiftScaleValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatShiftScaleValueLogicalFunction.cpp new file mode 100644 index 0000000000..9fe4dd7898 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatShiftScaleValueLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatShiftScaleValueLogicalFunction::TfloatShiftScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType TfloatShiftScaleValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatShiftScaleValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatShiftScaleValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatShiftScaleValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TfloatShiftScaleValueLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatShiftScaleValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatShiftScaleValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatShiftScaleValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatShiftScaleValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatShiftScaleValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatShiftScaleValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TfloatShiftScaleValueLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TfloatShiftScaleValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatShiftValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatShiftValueLogicalFunction.cpp new file mode 100644 index 0000000000..bd50ef0c11 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatShiftValueLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatShiftValueLogicalFunction::TfloatShiftValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TfloatShiftValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatShiftValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatShiftValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatShiftValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TfloatShiftValueLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatShiftValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatShiftValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatShiftValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatShiftValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatShiftValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatShiftValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TfloatShiftValueLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TfloatShiftValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatToTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatToTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..a67b4abba8 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatToTbigintLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatToTbigintLogicalFunction::TfloatToTbigintLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatToTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatToTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatToTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatToTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatToTbigintLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatToTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatToTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatToTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatToTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatToTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatToTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatToTbigintLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatToTbigintLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TfloatToTintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TfloatToTintLogicalFunction.cpp new file mode 100644 index 0000000000..a9ac52789e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TfloatToTintLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TfloatToTintLogicalFunction::TfloatToTintLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TfloatToTintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TfloatToTintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TfloatToTintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TfloatToTintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TfloatToTintLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TfloatToTintLogicalFunction::getType() const +{ + return NAME; +} + +bool TfloatToTintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TfloatToTintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TfloatToTintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TfloatToTintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTfloatToTintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TfloatToTintLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TfloatToTintLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.cpp new file mode 100644 index 0000000000..ebd3ff33a9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexAreNeighborCellsLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexAreNeighborCellsLogicalFunction::Th3indexAreNeighborCellsLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction cell0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(cell0)); + parameters.push_back(std::move(ts0)); +} + +DataType Th3indexAreNeighborCellsLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexAreNeighborCellsLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexAreNeighborCellsLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexAreNeighborCellsLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "Th3indexAreNeighborCellsLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexAreNeighborCellsLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexAreNeighborCellsLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexAreNeighborCellsLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexAreNeighborCellsLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexAreNeighborCellsLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexAreNeighborCellsLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "Th3indexAreNeighborCellsLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return Th3indexAreNeighborCellsLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.cpp new file mode 100644 index 0000000000..87f7c91b31 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexCellToCenterChildLogicalFunction::Th3indexCellToCenterChildLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType Th3indexCellToCenterChildLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexCellToCenterChildLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexCellToCenterChildLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexCellToCenterChildLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "Th3indexCellToCenterChildLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexCellToCenterChildLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexCellToCenterChildLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexCellToCenterChildLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexCellToCenterChildLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexCellToCenterChildLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexCellToCenterChildLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "Th3indexCellToCenterChildLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return Th3indexCellToCenterChildLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.cpp new file mode 100644 index 0000000000..d22d34a95e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexCellToCenterChildNextLogicalFunction::Th3indexCellToCenterChildNextLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType Th3indexCellToCenterChildNextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexCellToCenterChildNextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexCellToCenterChildNextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexCellToCenterChildNextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "Th3indexCellToCenterChildNextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexCellToCenterChildNextLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexCellToCenterChildNextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexCellToCenterChildNextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexCellToCenterChildNextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexCellToCenterChildNextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexCellToCenterChildNextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "Th3indexCellToCenterChildNextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return Th3indexCellToCenterChildNextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexCellToChildPosLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexCellToChildPosLogicalFunction.cpp new file mode 100644 index 0000000000..c4a98f9435 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexCellToChildPosLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexCellToChildPosLogicalFunction::Th3indexCellToChildPosLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType Th3indexCellToChildPosLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexCellToChildPosLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexCellToChildPosLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexCellToChildPosLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "Th3indexCellToChildPosLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexCellToChildPosLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexCellToChildPosLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexCellToChildPosLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexCellToChildPosLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexCellToChildPosLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexCellToChildPosLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "Th3indexCellToChildPosLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return Th3indexCellToChildPosLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexCellToParentLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexCellToParentLogicalFunction.cpp new file mode 100644 index 0000000000..bc722b1f03 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexCellToParentLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexCellToParentLogicalFunction::Th3indexCellToParentLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType Th3indexCellToParentLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexCellToParentLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexCellToParentLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexCellToParentLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "Th3indexCellToParentLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexCellToParentLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexCellToParentLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexCellToParentLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexCellToParentLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexCellToParentLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexCellToParentLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "Th3indexCellToParentLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return Th3indexCellToParentLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexCellToParentNextLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexCellToParentNextLogicalFunction.cpp new file mode 100644 index 0000000000..fba0546989 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexCellToParentNextLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexCellToParentNextLogicalFunction::Th3indexCellToParentNextLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(3); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType Th3indexCellToParentNextLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexCellToParentNextLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexCellToParentNextLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexCellToParentNextLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "Th3indexCellToParentNextLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexCellToParentNextLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexCellToParentNextLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexCellToParentNextLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexCellToParentNextLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexCellToParentNextLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexCellToParentNextLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "Th3indexCellToParentNextLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return Th3indexCellToParentNextLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.cpp new file mode 100644 index 0000000000..26308db9ff --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexGetBaseCellNumberLogicalFunction::Th3indexGetBaseCellNumberLogicalFunction(LogicalFunction cell, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); +} + +DataType Th3indexGetBaseCellNumberLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexGetBaseCellNumberLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexGetBaseCellNumberLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexGetBaseCellNumberLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "Th3indexGetBaseCellNumberLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexGetBaseCellNumberLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexGetBaseCellNumberLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexGetBaseCellNumberLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexGetBaseCellNumberLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexGetBaseCellNumberLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexGetBaseCellNumberLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "Th3indexGetBaseCellNumberLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return Th3indexGetBaseCellNumberLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexGetResolutionLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexGetResolutionLogicalFunction.cpp new file mode 100644 index 0000000000..d139994ac2 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexGetResolutionLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexGetResolutionLogicalFunction::Th3indexGetResolutionLogicalFunction(LogicalFunction cell, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); +} + +DataType Th3indexGetResolutionLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexGetResolutionLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexGetResolutionLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexGetResolutionLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "Th3indexGetResolutionLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexGetResolutionLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexGetResolutionLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexGetResolutionLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexGetResolutionLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexGetResolutionLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexGetResolutionLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "Th3indexGetResolutionLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return Th3indexGetResolutionLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexGridDistanceLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexGridDistanceLogicalFunction.cpp new file mode 100644 index 0000000000..9202619018 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexGridDistanceLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexGridDistanceLogicalFunction::Th3indexGridDistanceLogicalFunction(LogicalFunction cell, + LogicalFunction ts, + LogicalFunction cell0, + LogicalFunction ts0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(4); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(cell0)); + parameters.push_back(std::move(ts0)); +} + +DataType Th3indexGridDistanceLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexGridDistanceLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexGridDistanceLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexGridDistanceLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "Th3indexGridDistanceLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexGridDistanceLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexGridDistanceLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexGridDistanceLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexGridDistanceLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexGridDistanceLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexGridDistanceLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "Th3indexGridDistanceLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return Th3indexGridDistanceLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexIsPentagonLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexIsPentagonLogicalFunction.cpp new file mode 100644 index 0000000000..781247a971 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexIsPentagonLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexIsPentagonLogicalFunction::Th3indexIsPentagonLogicalFunction(LogicalFunction cell, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); +} + +DataType Th3indexIsPentagonLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexIsPentagonLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexIsPentagonLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexIsPentagonLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "Th3indexIsPentagonLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexIsPentagonLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexIsPentagonLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexIsPentagonLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexIsPentagonLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexIsPentagonLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexIsPentagonLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "Th3indexIsPentagonLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return Th3indexIsPentagonLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/Th3indexIsValidCellLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/Th3indexIsValidCellLogicalFunction.cpp new file mode 100644 index 0000000000..84362727fd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/Th3indexIsValidCellLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +Th3indexIsValidCellLogicalFunction::Th3indexIsValidCellLogicalFunction(LogicalFunction cell, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(cell)); + parameters.push_back(std::move(ts)); +} + +DataType Th3indexIsValidCellLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction Th3indexIsValidCellLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector Th3indexIsValidCellLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction Th3indexIsValidCellLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "Th3indexIsValidCellLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view Th3indexIsValidCellLogicalFunction::getType() const +{ + return NAME; +} + +bool Th3indexIsValidCellLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string Th3indexIsValidCellLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction Th3indexIsValidCellLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction Th3indexIsValidCellLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTh3indexIsValidCellLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "Th3indexIsValidCellLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return Th3indexIsValidCellLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TintScaleValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TintScaleValueLogicalFunction.cpp new file mode 100644 index 0000000000..6ab5688ae7 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TintScaleValueLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TintScaleValueLogicalFunction::TintScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TintScaleValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TintScaleValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TintScaleValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TintScaleValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TintScaleValueLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TintScaleValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TintScaleValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TintScaleValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TintScaleValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TintScaleValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTintScaleValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TintScaleValueLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TintScaleValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TintShiftScaleValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TintShiftScaleValueLogicalFunction.cpp new file mode 100644 index 0000000000..ded8a34f32 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TintShiftScaleValueLogicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TintShiftScaleValueLogicalFunction::TintShiftScaleValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0, + LogicalFunction arg1) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(4); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(arg1)); +} + +DataType TintShiftScaleValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TintShiftScaleValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TintShiftScaleValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TintShiftScaleValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 4, "TintShiftScaleValueLogicalFunction requires 4 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TintShiftScaleValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TintShiftScaleValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TintShiftScaleValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TintShiftScaleValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TintShiftScaleValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTintShiftScaleValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 4, + "TintShiftScaleValueLogicalFunction requires 4 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + auto arg3 = std::move(arguments.children[3]); + return TintShiftScaleValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TintShiftValueLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TintShiftValueLogicalFunction.cpp new file mode 100644 index 0000000000..8b6aff56ab --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TintShiftValueLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TintShiftValueLogicalFunction::TintShiftValueLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::INT32)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TintShiftValueLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TintShiftValueLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TintShiftValueLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TintShiftValueLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TintShiftValueLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TintShiftValueLogicalFunction::getType() const +{ + return NAME; +} + +bool TintShiftValueLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TintShiftValueLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TintShiftValueLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TintShiftValueLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTintShiftValueLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TintShiftValueLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TintShiftValueLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TintToTbigintLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TintToTbigintLogicalFunction.cpp new file mode 100644 index 0000000000..65349fe1ed --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TintToTbigintLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TintToTbigintLogicalFunction::TintToTbigintLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TintToTbigintLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TintToTbigintLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TintToTbigintLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TintToTbigintLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TintToTbigintLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TintToTbigintLogicalFunction::getType() const +{ + return NAME; +} + +bool TintToTbigintLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TintToTbigintLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TintToTbigintLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TintToTbigintLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTintToTbigintLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TintToTbigintLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TintToTbigintLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TintToTfloatLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TintToTfloatLogicalFunction.cpp new file mode 100644 index 0000000000..9f6957af15 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TintToTfloatLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TintToTfloatLogicalFunction::TintToTfloatLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TintToTfloatLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TintToTfloatLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TintToTfloatLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TintToTfloatLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TintToTfloatLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TintToTfloatLogicalFunction::getType() const +{ + return NAME; +} + +bool TintToTfloatLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TintToTfloatLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TintToTfloatLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TintToTfloatLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTintToTfloatLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TintToTfloatLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TintToTfloatLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TneBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..6bce0fdc49 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TneBoolTboolLogicalFunction::TneBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TneBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TneBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TneBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TneBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TneBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TneTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TneTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..8c15a123ff --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TneTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TneTboolBoolLogicalFunction::TneTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TneTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TneTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TneTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TneTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TneTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TneTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool TneTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TneTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TneTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TneTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTneTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TneTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TneTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TnotTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TnotTboolLogicalFunction.cpp new file mode 100644 index 0000000000..573495990b --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TnotTboolLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TnotTboolLogicalFunction::TnotTboolLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TnotTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TnotTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TnotTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TnotTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TnotTboolLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TnotTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TnotTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TnotTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TnotTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TnotTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTnotTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TnotTboolLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TnotTboolLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TnpointLengthLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TnpointLengthLogicalFunction.cpp new file mode 100644 index 0000000000..8b425f6b04 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TnpointLengthLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TnpointLengthLogicalFunction::TnpointLengthLogicalFunction(LogicalFunction rid, + LogicalFunction frac, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(3); + parameters.push_back(std::move(rid)); + parameters.push_back(std::move(frac)); + parameters.push_back(std::move(ts)); +} + +DataType TnpointLengthLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TnpointLengthLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TnpointLengthLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TnpointLengthLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TnpointLengthLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TnpointLengthLogicalFunction::getType() const +{ + return NAME; +} + +bool TnpointLengthLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TnpointLengthLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TnpointLengthLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TnpointLengthLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTnpointLengthLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TnpointLengthLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TnpointLengthLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TorBoolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TorBoolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..124017ec3a --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TorBoolTboolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TorBoolTboolLogicalFunction::TorBoolTboolLogicalFunction(LogicalFunction arg0, + LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(arg0)); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TorBoolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TorBoolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TorBoolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TorBoolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TorBoolTboolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TorBoolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TorBoolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TorBoolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TorBoolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TorBoolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTorBoolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TorBoolTboolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TorBoolTboolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TorTboolBoolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TorTboolBoolLogicalFunction.cpp new file mode 100644 index 0000000000..063f0775a9 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TorTboolBoolLogicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TorTboolBoolLogicalFunction::TorTboolBoolLogicalFunction(LogicalFunction value, + LogicalFunction ts, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::BOOLEAN)) +{ + parameters.reserve(3); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); + parameters.push_back(std::move(arg0)); +} + +DataType TorTboolBoolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TorTboolBoolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TorTboolBoolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TorTboolBoolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 3, "TorTboolBoolLogicalFunction requires 3 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TorTboolBoolLogicalFunction::getType() const +{ + return NAME; +} + +bool TorTboolBoolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TorTboolBoolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TorTboolBoolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TorTboolBoolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTorTboolBoolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 3, + "TorTboolBoolLogicalFunction requires 3 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + auto arg2 = std::move(arguments.children[2]); + return TorTboolBoolLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TorTboolTboolLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TorTboolTboolLogicalFunction.cpp new file mode 100644 index 0000000000..3cc34b35bd --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TorTboolTboolLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TorTboolTboolLogicalFunction::TorTboolTboolLogicalFunction(LogicalFunction traj, + LogicalFunction arg0) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(traj)); + parameters.push_back(std::move(arg0)); +} + +DataType TorTboolTboolLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TorTboolTboolLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TorTboolTboolLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TorTboolTboolLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TorTboolTboolLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TorTboolTboolLogicalFunction::getType() const +{ + return NAME; +} + +bool TorTboolTboolLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TorTboolTboolLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TorTboolTboolLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TorTboolTboolLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTorTboolTboolLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TorTboolTboolLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TorTboolTboolLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TpointLengthWkbLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TpointLengthWkbLogicalFunction.cpp new file mode 100644 index 0000000000..e028c583d0 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TpointLengthWkbLogicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TpointLengthWkbLogicalFunction::TpointLengthWkbLogicalFunction(LogicalFunction traj) + : dataType(DataTypeProvider::provideDataType(DataType::Type::FLOAT64)) +{ + parameters.reserve(1); + parameters.push_back(std::move(traj)); +} + +DataType TpointLengthWkbLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TpointLengthWkbLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TpointLengthWkbLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TpointLengthWkbLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 1, "TpointLengthWkbLogicalFunction requires 1 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TpointLengthWkbLogicalFunction::getType() const +{ + return NAME; +} + +bool TpointLengthWkbLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TpointLengthWkbLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TpointLengthWkbLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TpointLengthWkbLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTpointLengthWkbLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 1, + "TpointLengthWkbLogicalFunction requires 1 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + return TpointLengthWkbLogicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TtextInitcapLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TtextInitcapLogicalFunction.cpp new file mode 100644 index 0000000000..b4115bca7e --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TtextInitcapLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TtextInitcapLogicalFunction::TtextInitcapLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TtextInitcapLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TtextInitcapLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TtextInitcapLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TtextInitcapLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TtextInitcapLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TtextInitcapLogicalFunction::getType() const +{ + return NAME; +} + +bool TtextInitcapLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TtextInitcapLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TtextInitcapLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TtextInitcapLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTtextInitcapLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TtextInitcapLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TtextInitcapLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TtextLowerLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TtextLowerLogicalFunction.cpp new file mode 100644 index 0000000000..b41d7a5109 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TtextLowerLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TtextLowerLogicalFunction::TtextLowerLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TtextLowerLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TtextLowerLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TtextLowerLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TtextLowerLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TtextLowerLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TtextLowerLogicalFunction::getType() const +{ + return NAME; +} + +bool TtextLowerLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TtextLowerLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TtextLowerLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TtextLowerLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTtextLowerLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TtextLowerLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TtextLowerLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-logical-operators/src/Functions/Meos/TtextUpperLogicalFunction.cpp b/nes-logical-operators/src/Functions/Meos/TtextUpperLogicalFunction.cpp new file mode 100644 index 0000000000..15d18d7f27 --- /dev/null +++ b/nes-logical-operators/src/Functions/Meos/TtextUpperLogicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace NES +{ + +TtextUpperLogicalFunction::TtextUpperLogicalFunction(LogicalFunction value, + LogicalFunction ts) + : dataType(DataTypeProvider::provideDataType(DataType::Type::VARSIZED)) +{ + parameters.reserve(2); + parameters.push_back(std::move(value)); + parameters.push_back(std::move(ts)); +} + +DataType TtextUpperLogicalFunction::getDataType() const +{ + return dataType; +} + +LogicalFunction TtextUpperLogicalFunction::withDataType(const DataType& newDataType) const +{ + auto copy = *this; + copy.dataType = newDataType; + return copy; +} + +std::vector TtextUpperLogicalFunction::getChildren() const +{ + return parameters; +} + +LogicalFunction TtextUpperLogicalFunction::withChildren(const std::vector& children) const +{ + PRECONDITION(children.size() == 2, "TtextUpperLogicalFunction requires 2 children, but got {}", children.size()); + auto copy = *this; + copy.parameters = children; + return copy; +} + +std::string_view TtextUpperLogicalFunction::getType() const +{ + return NAME; +} + +bool TtextUpperLogicalFunction::operator==(const LogicalFunctionConcept& rhs) const +{ + if (const auto* other = dynamic_cast(&rhs)) + { + return parameters == other->parameters; + } + return false; +} + +std::string TtextUpperLogicalFunction::explain(ExplainVerbosity verbosity) const +{ + std::string args; + for (size_t index = 0; index < parameters.size(); ++index) + { + if (index > 0) + { + args += ", "; + } + args += parameters[index].explain(verbosity); + } + return fmt::format("{}({})", NAME, args); +} + +LogicalFunction TtextUpperLogicalFunction::withInferredDataType(const Schema& schema) const +{ + std::vector newChildren; + newChildren.reserve(parameters.size()); + for (const auto& child : parameters) + { + newChildren.emplace_back(child.withInferredDataType(schema)); + } + return withChildren(newChildren); +} + +SerializableFunction TtextUpperLogicalFunction::serialize() const +{ + SerializableFunction proto; + proto.set_function_type(std::string(NAME)); + DataTypeSerializationUtil::serializeDataType(dataType, proto.mutable_data_type()); + for (const auto& child : parameters) + { + proto.add_children()->CopyFrom(child.serialize()); + } + return proto; +} + +LogicalFunctionRegistryReturnType LogicalFunctionGeneratedRegistrar::RegisterTtextUpperLogicalFunction( + LogicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.children.size() == 2, + "TtextUpperLogicalFunction requires 2 children but got {}", + arguments.children.size()); + auto arg0 = std::move(arguments.children[0]); + auto arg1 = std::move(arguments.children[1]); + return TtextUpperLogicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AboveStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AboveStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..138c4fac94 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AboveStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `above_stbox_stbox`. + * + * Per-event above_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AboveStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AboveStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AboveStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AboveStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..161932cd2b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AboveStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `above_stbox_tspatial`. + * + * Per-event above_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AboveStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + AboveStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AboveTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AboveTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..34dee5fb08 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AboveTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `above_tspatial_stbox`. + * + * Per-event above_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AboveTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AboveTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AboveTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AboveTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..b366f27ce2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AboveTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `above_tspatial_tspatial`. + * + * Per-event above_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AboveTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + AboveTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..64b993a907 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AcontainsGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AcontainsGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..108bbf6d56 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tcbuffer_geo`. + * + * Per-event acontains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcontainsTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcontainsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..714edab137 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tcbuffer_tcbuffer`. + * + * Per-event acontains_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcontainsTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AcontainsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..dcc9490423 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_geo`. + * + * Per-event acontains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcontainsTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcontainsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..a39e00ffbc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_tgeo`. + * + * Per-event acontains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcontainsTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcontainsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..57b3dd0586 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AcoversGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..660161810b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acovers_tcbuffer_geo`. + * + * Per-event acovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcoversTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..836362f6cb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acovers_tcbuffer_tcbuffer`. + * + * Per-event acovers_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcoversTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcoversTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..6cf9fb71ec --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acovers_tgeo_geo`. + * + * Per-event acovers_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcoversTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..3a56716ffc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acovers_tgeo_tgeo`. + * + * Per-event acovers_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AcoversTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..28a167368a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AcoversTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AcoversTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..fd8e4c3598 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_bigint_tbigint`. + * + * Per-event add_bigint_tbigint: scalar bigint plus single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AddBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..42f0013569 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_float_tfloat`. + * + * Per-event add_float_tfloat: scalar float plus single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AddFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..1033395edc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_int_tint`. + * + * Per-event add_int_tint: scalar int plus single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AddIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..f82cbc7c6a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_tbigint_bigint`. + * + * Per-event add_tbigint_bigint: single-instant tbigint plus scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AddTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..32a6d51f1d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_tfloat_float`. + * + * Per-event add_tfloat_float: single-instant tfloat plus scalar float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AddTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..03505efd9c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_tint_int`. + * + * Per-event add_tint_int: single-instant tint plus scalar int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AddTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AddTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AddTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..f67bad56d3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AddTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `add_tnumber_tnumber`. + * + * Per-event add_tnumber_tnumber: two temporal numbers added (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AddTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + AddTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..174c47a818 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tcbuffer_geo`. + * + * Per-event adisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdisjointTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..8f02e868d7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tcbuffer_tcbuffer`. + * + * Per-event adisjoint_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdisjointTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..29fb9010b0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_geo`. + * + * Per-event adisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdisjointTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..3e4b5d4bb4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_tgeo`. + * + * Per-event adisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdisjointTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..4c23c53acf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AdisjointTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..7107780fe9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AdisjointTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AdisjointTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..0070226d9f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_stbox_stbox`. + * + * Per-event adjacent_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..1b667cb727 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_stbox_tspatial`. + * + * Per-event adjacent_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..bd900dc904 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_tbox_tnumber`. + * + * Per-event adjacent_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..64466de2cd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_temporal_temporal`. + * + * Per-event adjacent_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..d3e5060309 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_tnumber_tbox`. + * + * Per-event adjacent_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..539f104180 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_tnumber_tnumber`. + * + * Per-event adjacent_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..6069f3443a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_tspatial_stbox`. + * + * Per-event adjacent_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..d8bc928e4d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adjacent_tspatial_tspatial`. + * + * Per-event adjacent_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdjacentTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + AdjacentTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..2dfb93fdec --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tcbuffer_cbuffer`. + * + * Per-event always-within-distance between a single-instant tcbuffer and a static cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdwithinTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..87e1189714 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tcbuffer_geo`. + * + * Per-event adwithin_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdwithinTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..a10a8ce1a1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tcbuffer_tcbuffer`. + * + * Per-event adwithin_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdwithinTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..e795996397 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_geo`. + * + * Per-event adwithin_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdwithinTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..52ce2372fd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_tgeo`. + * + * Per-event adwithin_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AdwithinTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..76f98a972e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AdwithinTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt, PhysicalFunction dist); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..4ae9f2a5c6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AdwithinTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AdwithinTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2, PhysicalFunction dist); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..b3121f73a6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_stbox_stbox`. + * + * Per-event after_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..9f5b5f4b0c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_stbox_tspatial`. + * + * Per-event after_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..e6e97568b7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_tbox_tnumber`. + * + * Per-event after_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..4d9ec343cc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_temporal_temporal`. + * + * Per-event after_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..e53eafed5c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_tnumber_tbox`. + * + * Per-event after_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..0a91cdc447 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_tnumber_tnumber`. + * + * Per-event after_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..21c8cac305 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_tspatial_stbox`. + * + * Per-event after_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AfterTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AfterTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..37cc690521 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AfterTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `after_tspatial_tspatial`. + * + * Per-event after_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AfterTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + AfterTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..b37e2c65c4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tcbuffer_geo`. + * + * Per-event aintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AintersectsTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..a30e8fc7b0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tcbuffer_tcbuffer`. + * + * Per-event aintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AintersectsTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..dd0ff11ebe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_geo`. + * + * Per-event aintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AintersectsTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..c254b36a7b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_tgeo`. + * + * Per-event aintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AintersectsTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..7e5e62d2ad --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AintersectsTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..93eb6c3a90 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AintersectsTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AintersectsTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..0ce68994f1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_bigint_tbigint`. + * + * Per-event always_eq_bigint_tbigint: always-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..6fef347849 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_bool_tbool`. + * + * Per-event always_eq_bool_tbool: always-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..2b52dffab5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_float_tfloat`. + * + * Per-event always_eq_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..9909f96822 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AlwaysEqGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..32d0badbe2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_int_tint`. + * + * Per-event always_eq_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..70b0d9fbce --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_npoint_tnpoint`. + * + * Always eq npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqNpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.hpp new file mode 100644 index 0000000000..c4044c66c5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_pose_tpose`. + * + * Always eq pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqPoseTposePhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqPoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..daf5e28f5c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tbigint_bigint`. + * + * Per-event always_eq_tbigint_bigint: always-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..74094201a5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tbool_bool`. + * + * Per-event always_eq_tbool_bool: always-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..e5763e35da --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tcbuffer_cbuffer`. + * + * Per-event always_eq_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..8280348056 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tcbuffer_tcbuffer`. + * + * Per-event always_eq_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..0410c5149d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_temporal_temporal`. + * + * Per-event always_eq_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..425c9fb8f7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_text_ttext(txt0, temp)`. + * + * Always eqqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..7bbcdc961f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tfloat_float`. + * + * Per-event always_eq_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..717e59d4a9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tgeo_geo`. + * + * Per-event always_eq_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..738be5a266 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tgeo_tgeo`. + * + * Per-event always_eq_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.hpp new file mode 100644 index 0000000000..a06507caef --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_th3index_h3index(temp, (H3Index)arg0)`. + * + * Always equal th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTh3indexH3indexPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..4189a3b588 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tint_int`. + * + * Per-event always_eq_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..712ea20802 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tjsonb_jsonb`. + * + * Always equal tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTjsonbJsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..b647cf0d2b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tjsonb_tjsonb`. + * + * Always equal tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTjsonbTjsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..b252596b9e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tnpoint_npoint`. + * + * Always eq tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTnpointNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..bd133274b3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tnpoint_tnpoint`. + * + * Always eq tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTnpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTposePosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTposePosePhysicalFunction.hpp new file mode 100644 index 0000000000..b208c49438 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTposePosePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tpose_pose`. + * + * Always eq tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTposePosePhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.hpp new file mode 100644 index 0000000000..ef3c5198da --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tpose_tpose`. + * + * Always eq tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTposeTposePhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..d87f417cd1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_tquadbin_quadbin(temp, (Quadbin)arg0)`. + * + * Always equal tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTquadbinQuadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..338a24810d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AlwaysEqTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..00f5c0d7b4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AlwaysEqTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..f58e263aaa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_eq_ttext_text(temp, txt0)`. + * + * Always eqqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysEqTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysEqTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..985f52e63d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_bigint_tbigint`. + * + * Per-event always_ge_bigint_tbigint: always-greater-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..a05fea70fe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_float_tfloat`. + * + * Per-event always_ge_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..d34686912b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_int_tint`. + * + * Per-event always_ge_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..5f1625715e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_tbigint_bigint`. + * + * Per-event always_ge_tbigint_bigint: always-greater-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..1b0fdd1162 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_temporal_temporal`. + * + * Per-event always_ge_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..dfdf90b0a0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_text_ttext(txt0, temp)`. + * + * Always gequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..bab8fdd45c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_tfloat_float`. + * + * Per-event always_ge_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..60a34c4209 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_tint_int`. + * + * Per-event always_ge_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..333420c1f7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ge_ttext_text(temp, txt0)`. + * + * Always gequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..7e396029d5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_bigint_tbigint`. + * + * Per-event always_gt_bigint_tbigint: always-greater-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..bde764a514 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_float_tfloat`. + * + * Per-event always_gt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..b8f94f9ed6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_int_tint`. + * + * Per-event always_gt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..1d33f42648 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_tbigint_bigint`. + * + * Per-event always_gt_tbigint_bigint: always-greater-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..42991d38b9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_temporal_temporal`. + * + * Per-event always_gt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..0b229a2be4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_text_ttext(txt0, temp)`. + * + * Always gtqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..62eb948b02 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_tfloat_float`. + * + * Per-event always_gt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..47f09f0474 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_tint_int`. + * + * Per-event always_gt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..42f2e70872 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_gt_ttext_text(temp, txt0)`. + * + * Always gtqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysGtTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysGtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..e135c26591 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_bigint_tbigint`. + * + * Per-event always_le_bigint_tbigint: always-less-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..cdfe1ba133 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_float_tfloat`. + * + * Per-event always_le_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..be893150dd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_int_tint`. + * + * Per-event always_le_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..00edf025ee --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_tbigint_bigint`. + * + * Per-event always_le_tbigint_bigint: always-less-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..22fec81155 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_temporal_temporal`. + * + * Per-event always_le_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..d95da543e1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_text_ttext(txt0, temp)`. + * + * Always lequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..7716e33d01 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_tfloat_float`. + * + * Per-event always_le_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..efb0c7ef6e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_tint_int`. + * + * Per-event always_le_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..26d29f3474 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_le_ttext_text(temp, txt0)`. + * + * Always lequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..1c0c55c291 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_bigint_tbigint`. + * + * Per-event always_lt_bigint_tbigint: always-less-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..ce9121a5ab --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_float_tfloat`. + * + * Per-event always_lt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..b45ed26082 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_int_tint`. + * + * Per-event always_lt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..6407656ff6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_tbigint_bigint`. + * + * Per-event always_lt_tbigint_bigint: always-less-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..3a2a68b80c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_temporal_temporal`. + * + * Per-event always_lt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..3a97ea64a5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_text_ttext(txt0, temp)`. + * + * Always ltqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..920a85ee77 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_tfloat_float`. + * + * Per-event always_lt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..86c96e39af --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_tint_int`. + * + * Per-event always_lt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..db750e9056 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_lt_ttext_text(temp, txt0)`. + * + * Always ltqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysLtTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysLtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..3ed21898f1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_bigint_tbigint`. + * + * Per-event always_ne_bigint_tbigint: always-not-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..a38e1f3ebe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_bool_tbool`. + * + * Per-event always_ne_bool_tbool: always-not-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..08fe25f246 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_float_tfloat`. + * + * Per-event always_ne_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..19ec8bffc2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AlwaysNeGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..5afcb744b1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_int_tint`. + * + * Per-event always_ne_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..73b1327947 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_npoint_tnpoint`. + * + * Always ne npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeNpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNePoseTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNePoseTposePhysicalFunction.hpp new file mode 100644 index 0000000000..3e33c5a606 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNePoseTposePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_pose_tpose`. + * + * Always ne pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNePoseTposePhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNePoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..28e59efdd1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tbigint_bigint`. + * + * Per-event always_ne_tbigint_bigint: always-not-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..6c40c2f2bd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tbool_bool`. + * + * Per-event always_ne_tbool_bool: always-not-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..c7a2920f88 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tcbuffer_cbuffer`. + * + * Per-event always_ne_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..cb3e61675d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tcbuffer_tcbuffer`. + * + * Per-event always_ne_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..71e9edb236 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_temporal_temporal`. + * + * Per-event always_ne_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..6bd6577436 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_text_ttext(txt0, temp)`. + * + * Always nequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..fe1a8079b9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tfloat_float`. + * + * Per-event always_ne_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..7ab3136875 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tgeo_geo`. + * + * Per-event always_ne_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..48d62e8259 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tgeo_tgeo`. + * + * Per-event always_ne_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.hpp new file mode 100644 index 0000000000..51566aa1ac --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_th3index_h3index(temp, (H3Index)arg0)`. + * + * Always neual th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTh3indexH3indexPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..d318879342 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tint_int`. + * + * Per-event always_ne_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..e368496cf8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tjsonb_jsonb`. + * + * Always neual tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTjsonbJsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..5e9fa9b87f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tjsonb_tjsonb`. + * + * Always neual tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTjsonbTjsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..0c418097c4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tnpoint_npoint`. + * + * Always ne tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTnpointNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..3bf2b90ecc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tnpoint_tnpoint`. + * + * Always ne tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTnpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTposePosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTposePosePhysicalFunction.hpp new file mode 100644 index 0000000000..a2c7a88615 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTposePosePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tpose_pose`. + * + * Always ne tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTposePosePhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.hpp new file mode 100644 index 0000000000..b38469b997 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tpose_tpose`. + * + * Always ne tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTposeTposePhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..1e6cc01f0b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_tquadbin_quadbin(temp, (Quadbin)arg0)`. + * + * Always neual tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTquadbinQuadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..d6c20db78a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AlwaysNeTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..c830b1b5f1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AlwaysNeTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..d40d60e95c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `always_ne_ttext_text(temp, txt0)`. + * + * Always nequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AlwaysNeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + AlwaysNeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..89b2da8e47 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tcbuffer_geo`. + * + * Per-event atouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AtouchesTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..f27c490e4c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tcbuffer_tcbuffer`. + * + * Per-event atouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AtouchesTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..5f487d025b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_geo`. + * + * Per-event atouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AtouchesTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..9a89ad2e6e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_tgeo`. + * + * Per-event atouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AtouchesTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AtouchesTpointGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTpointGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..617138d782 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTpointGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tpoint_geo`. + * + * Per-event atouches_tpoint_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class AtouchesTpointGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTpointGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..10bf0df47b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class AtouchesTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + AtouchesTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BackStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BackStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..ebc7db0025 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BackStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `back_stbox_stbox`. + * + * Per-event back_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BackStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BackStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BackStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BackStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..19af3a4e1e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BackStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `back_stbox_tspatial`. + * + * Per-event back_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BackStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + BackStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BackTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BackTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..25c2d55b7f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BackTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `back_tspatial_stbox`. + * + * Per-event back_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BackTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BackTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BackTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BackTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..f9cba22c81 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BackTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `back_tspatial_tspatial`. + * + * Per-event back_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BackTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + BackTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..090eda7898 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_stbox_stbox`. + * + * Per-event before_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..4f13c0c845 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_stbox_tspatial`. + * + * Per-event before_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..136c168a2a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_tbox_tnumber`. + * + * Per-event before_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..489cfd4ec6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_temporal_temporal`. + * + * Per-event before_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..5f47192f32 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_tnumber_tbox`. + * + * Per-event before_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..b4449ee532 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_tnumber_tnumber`. + * + * Per-event before_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..3ba7edc2dc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_tspatial_stbox`. + * + * Per-event before_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..af79898659 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `before_tspatial_tspatial`. + * + * Per-event before_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BeforeTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + BeforeTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BelowStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BelowStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..80a5f38240 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BelowStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `below_stbox_stbox`. + * + * Per-event below_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BelowStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BelowStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BelowStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BelowStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..25be9ac544 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BelowStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `below_stbox_tspatial`. + * + * Per-event below_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BelowStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + BelowStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BelowTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BelowTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..65f58970c8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BelowTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `below_tspatial_stbox`. + * + * Per-event below_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BelowTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + BelowTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/BelowTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/BelowTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..31c1332df3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/BelowTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `below_tspatial_tspatial`. + * + * Per-event below_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class BelowTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + BelowTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedFloatSpanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedFloatSpanPhysicalFunction.hpp new file mode 100644 index 0000000000..8025ed4cab --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedFloatSpanPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_float_span(arg0, temp)`. + * + * Float contained in span + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedFloatSpanPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedFloatSpanPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.hpp new file mode 100644 index 0000000000..54625b5b6f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_span_span(temp, sp0)`. + * + * Floatspan contained in floatspan + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedFloatspanSpanPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedFloatspanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedIntSpanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedIntSpanPhysicalFunction.hpp new file mode 100644 index 0000000000..47db35bf37 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedIntSpanPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_int_span((int)arg0, temp)`. + * + * Int contained in span + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedIntSpanPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedIntSpanPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedSpanSpanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedSpanSpanPhysicalFunction.hpp new file mode 100644 index 0000000000..91c0f47613 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedSpanSpanPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_span_span(temp, sp0)`. + * + * Intspan contained in intspan + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedSpanSpanPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedSpanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..3b1548c2a5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_stbox_stbox`. + * + * Per-event contained_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..e058b05177 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_stbox_tspatial`. + * + * Per-event contained_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..065fdeaf8e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_tbox_tnumber`. + * + * Per-event contained_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..aef8a04a55 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_temporal_temporal`. + * + * Per-event contained_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..8760463a00 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_tnumber_tbox`. + * + * Per-event contained_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..c057faf07f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_tnumber_tnumber`. + * + * Per-event contained_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..a11d700e0b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_tspatial_stbox`. + * + * Per-event contained_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..550351ff38 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contained_tspatial_tspatial`. + * + * Per-event contained_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainedTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainedTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.hpp new file mode 100644 index 0000000000..291ce94d76 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_span_span(temp, sp0)`. + * + * Floatspan contains floatspan + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsFloatspanSpanPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsFloatspanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsSpanFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsSpanFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..5a5bc31101 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsSpanFloatPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_span_float(temp, arg0)`. + * + * Floatspan contains float + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsSpanFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsSpanFloatPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsSpanIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsSpanIntPhysicalFunction.hpp new file mode 100644 index 0000000000..1f8d0383ee --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsSpanIntPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_span_int(temp, (int)arg0)`. + * + * Intspan contains int + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsSpanIntPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsSpanIntPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsSpanSpanPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsSpanSpanPhysicalFunction.hpp new file mode 100644 index 0000000000..2983f7460a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsSpanSpanPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_span_span(temp, sp0)`. + * + * Intspan contains intspan + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsSpanSpanPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsSpanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..7e17c46526 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_stbox_stbox`. + * + * Per-event contains_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..a2689d9532 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_stbox_tspatial`. + * + * Per-event contains_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..d56a244b71 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_tbox_tnumber`. + * + * Per-event contains_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..581cfbba8b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_temporal_temporal`. + * + * Per-event contains_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..148b49bb9d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_tnumber_tbox`. + * + * Per-event contains_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..7cc9e30581 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_tnumber_tnumber`. + * + * Per-event contains_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..84643687d2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_tspatial_stbox`. + * + * Per-event contains_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..1a2356e713 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `contains_tspatial_tspatial`. + * + * Per-event contains_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class ContainsTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + ContainsTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..cecc3180b5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_bigint_tbigint`. + * + * Per-event div_bigint_tbigint: scalar bigint divided by single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + DivBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..8e32e22111 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_float_tfloat`. + * + * Per-event div_float_tfloat: scalar float divided by single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + DivFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..4523f91b00 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_int_tint`. + * + * Per-event div_int_tint: scalar int divided by single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + DivIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..c7e5d35ef6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_tbigint_bigint`. + * + * Per-event div_tbigint_bigint: single-instant tbigint divided by scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + DivTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..a4b1303f6e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_tfloat_float`. + * + * Per-event div_tfloat_float: single-instant tfloat divided by scalar float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + DivTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..2c2794257a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_tint_int`. + * + * Per-event div_tint_int: single-instant tint divided by scalar int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + DivTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/DivTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/DivTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..bbd6671ea4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/DivTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `div_tnumber_tnumber`. + * + * Per-event div_tnumber_tnumber: two temporal numbers divided (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class DivTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + DivTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..1c829c0fa7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EcontainsGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EcontainsGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..105b252184 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tcbuffer_geo`. + * + * Per-event econtains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcontainsTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcontainsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..78ac97beff --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tcbuffer_tcbuffer`. + * + * Per-event econtains_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcontainsTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EcontainsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..f13345478d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_geo`. + * + * Per-event econtains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcontainsTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcontainsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..cc2c39cf63 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_tgeo`. + * + * Per-event econtains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcontainsTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcontainsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..33c2d73ef4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EcoversGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..bce039152e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tcbuffer_geo`. + * + * Per-event ecovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcoversTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..3653ea5ed6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tcbuffer_tcbuffer`. + * + * Per-event ecovers_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcoversTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcoversTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..ba916b5cb6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_geo`. + * + * Per-event ecovers_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcoversTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..f59f49d41b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_tgeo`. + * + * Per-event ecovers_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EcoversTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..706faff086 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EcoversTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EcoversTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..a2fb5ee8fd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tcbuffer_geo`. + * + * Per-event edisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdisjointTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..f32df866a0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tcbuffer_tcbuffer`. + * + * Per-event edisjoint_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdisjointTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..f002ced9cb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_geo`. + * + * Per-event edisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdisjointTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..12157a31a9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_tgeo`. + * + * Per-event edisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdisjointTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..ecf4a89e72 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EdisjointTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..b84f2fb97d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EdisjointTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EdisjointTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..31e9fbe801 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tcbuffer_cbuffer`. + * + * Per-event ever-within-distance between a single-instant tcbuffer and a static cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdwithinTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..04dfc4c59c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tcbuffer_geo`. + * + * Per-event edwithin_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdwithinTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..4d6cb24b6d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tcbuffer_tcbuffer`. + * + * Per-event edwithin_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdwithinTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..93a288946f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_geo`. + * + * Per-event edwithin_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdwithinTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..87d0522d69 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_tgeo`. + * + * Per-event edwithin_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EdwithinTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..714de43c4c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EdwithinTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt, PhysicalFunction dist); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..fc572ac48c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EdwithinTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EdwithinTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2, PhysicalFunction dist); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..63c2eb7075 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tcbuffer_geo`. + * + * Per-event eintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EintersectsTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..9ccf2ab4f7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tcbuffer_tcbuffer`. + * + * Per-event eintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EintersectsTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..63ab26824c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_geo`. + * + * Per-event eintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EintersectsTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..4c7721526a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_tgeo`. + * + * Per-event eintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EintersectsTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..80b8162757 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EintersectsTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..02520859a9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EintersectsTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EintersectsTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..c16db22bda --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tcbuffer_geo`. + * + * Per-event etouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EtouchesTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..cab92f21db --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tcbuffer_tcbuffer`. + * + * Per-event etouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EtouchesTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..2cee68ec92 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_geo`. + * + * Per-event etouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EtouchesTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..1075f68d62 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_tgeo`. + * + * Per-event etouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EtouchesTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EtouchesTpointGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTpointGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..54b4ec01ca --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTpointGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tpoint_geo`. + * + * Per-event etouches_tpoint_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EtouchesTpointGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTpointGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..3054073386 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EtouchesTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EtouchesTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..2be047dc17 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_bigint_tbigint`. + * + * Per-event ever_eq_bigint_tbigint: ever-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..e83b359249 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_bool_tbool`. + * + * Per-event ever_eq_bool_tbool: ever-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..7e54acc46e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_float_tfloat`. + * + * Per-event ever_eq_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..46bb6338b3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EverEqGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..35c3c3a92b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_int_tint`. + * + * Per-event ever_eq_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqNpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqNpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..befbe9d18b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqNpointTnpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_npoint_tnpoint`. + * + * Ever eq npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqNpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqPoseTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqPoseTposePhysicalFunction.hpp new file mode 100644 index 0000000000..aad5f1d69f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqPoseTposePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_pose_tpose`. + * + * Ever eq pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqPoseTposePhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqPoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..564ebfc4ac --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tbigint_bigint`. + * + * Per-event ever_eq_tbigint_bigint: ever-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..c7b71d6081 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tbool_bool`. + * + * Per-event ever_eq_tbool_bool: ever-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..d8fe1b95d7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tcbuffer_cbuffer`. + * + * Per-event ever_eq_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..a61e9b745e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tcbuffer_tcbuffer`. + * + * Per-event ever_eq_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..bb84ecdbbd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_temporal_temporal`. + * + * Per-event ever_eq_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..1d7bbaef3f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_text_ttext(txt0, temp)`. + * + * Ever eqqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..b388c5b1bf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tfloat_float`. + * + * Per-event ever_eq_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..160a04b10b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tgeo_geo`. + * + * Per-event ever_eq_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..213df2daf1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tgeo_tgeo`. + * + * Per-event ever_eq_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.hpp new file mode 100644 index 0000000000..d10ff54a01 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_th3index_h3index(temp, (H3Index)arg0)`. + * + * Ever equal th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTh3indexH3indexPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..20e49bc2e0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tint_int`. + * + * Per-event ever_eq_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..7529f14b12 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tjsonb_jsonb`. + * + * Ever equal tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTjsonbJsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..80a1fa484c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tjsonb_tjsonb`. + * + * Ever equal tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTjsonbTjsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTnpointNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTnpointNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..7bf7c835bb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTnpointNpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tnpoint_npoint`. + * + * Ever eq tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTnpointNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..2c8679d5fa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tnpoint_tnpoint`. + * + * Ever eq tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTnpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTposePosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTposePosePhysicalFunction.hpp new file mode 100644 index 0000000000..eb1111cc1d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTposePosePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tpose_pose`. + * + * Ever eq tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTposePosePhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTposeTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTposeTposePhysicalFunction.hpp new file mode 100644 index 0000000000..b41239e695 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTposeTposePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tpose_tpose`. + * + * Ever eq tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTposeTposePhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..6b11921e57 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_tquadbin_quadbin(temp, (Quadbin)arg0)`. + * + * Ever equal tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTquadbinQuadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..2aef973091 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EverEqTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..53c9a1f285 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EverEqTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverEqTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverEqTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..2eeef8a1b9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverEqTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_eq_ttext_text(temp, txt0)`. + * + * Ever eqqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverEqTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverEqTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..5f8c04f1c0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_bigint_tbigint`. + * + * Per-event ever_ge_bigint_tbigint: ever-greater-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..4fc7d3d3f9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_float_tfloat`. + * + * Per-event ever_ge_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..13f8d27a99 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_int_tint`. + * + * Per-event ever_ge_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..cbe6f46aa0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_tbigint_bigint`. + * + * Per-event ever_ge_tbigint_bigint: ever-greater-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..e8a1924297 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_temporal_temporal`. + * + * Per-event ever_ge_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..cb24f10adf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_text_ttext(txt0, temp)`. + * + * Ever gequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..88ae92f95c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_tfloat_float`. + * + * Per-event ever_ge_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..798675acbb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_tint_int`. + * + * Per-event ever_ge_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..7309a99a5b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ge_ttext_text(temp, txt0)`. + * + * Ever gequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..96122101c2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_bigint_tbigint`. + * + * Per-event ever_gt_bigint_tbigint: ever-greater-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..dc3bb71b43 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_float_tfloat`. + * + * Per-event ever_gt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..73e5d856c3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_int_tint`. + * + * Per-event ever_gt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..6b856c7723 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_tbigint_bigint`. + * + * Per-event ever_gt_tbigint_bigint: ever-greater-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..433ef42ec5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_temporal_temporal`. + * + * Per-event ever_gt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..8c0cf88612 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_text_ttext(txt0, temp)`. + * + * Ever gtqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..df03e3dff3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_tfloat_float`. + * + * Per-event ever_gt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..a2114c7a27 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_tint_int`. + * + * Per-event ever_gt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverGtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverGtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..5a95d840c1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverGtTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_gt_ttext_text(temp, txt0)`. + * + * Ever gtqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverGtTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverGtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..99b1c2836a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_bigint_tbigint`. + * + * Per-event ever_le_bigint_tbigint: ever-less-or-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..067de42e21 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_float_tfloat`. + * + * Per-event ever_le_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..9a28578b2c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_int_tint`. + * + * Per-event ever_le_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..ee135f5ab3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_tbigint_bigint`. + * + * Per-event ever_le_tbigint_bigint: ever-less-or-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..d066c5b9b5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_temporal_temporal`. + * + * Per-event ever_le_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..344c0b9cce --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_text_ttext(txt0, temp)`. + * + * Ever lequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..2111e9c07f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_tfloat_float`. + * + * Per-event ever_le_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..08b5ae73d0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_tint_int`. + * + * Per-event ever_le_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..353eaaf203 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_le_ttext_text(temp, txt0)`. + * + * Ever lequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..c0f460b7c5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_bigint_tbigint`. + * + * Per-event ever_lt_bigint_tbigint: ever-less-than scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..e2eb19aac5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_float_tfloat`. + * + * Per-event ever_lt_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..a2150e9e3c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_int_tint`. + * + * Per-event ever_lt_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..dd8ec19283 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_tbigint_bigint`. + * + * Per-event ever_lt_tbigint_bigint: ever-less-than tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..0e71668474 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_temporal_temporal`. + * + * Per-event ever_lt_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..415498263f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_text_ttext(txt0, temp)`. + * + * Ever ltqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..eacbfa415c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_tfloat_float`. + * + * Per-event ever_lt_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..82bd96e766 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_tint_int`. + * + * Per-event ever_lt_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverLtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverLtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..e12029c594 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverLtTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_lt_ttext_text(temp, txt0)`. + * + * Ever ltqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverLtTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverLtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..e2f372596a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_bigint_tbigint`. + * + * Per-event ever_ne_bigint_tbigint: ever-not-equal scalar bigint vs tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..dfad962903 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_bool_tbool`. + * + * Per-event ever_ne_bool_tbool: ever-not-equal scalar bool vs tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..0dbd719876 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_float_tfloat`. + * + * Per-event ever_ne_float_tfloat (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..309aa7e04c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EverNeGeoTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..dde75c0d57 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_int_tint`. + * + * Per-event ever_ne_int_tint (scalar first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeNpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeNpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..f20fb9b6b5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeNpointTnpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_npoint_tnpoint`. + * + * Ever ne npoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeNpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNePoseTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNePoseTposePhysicalFunction.hpp new file mode 100644 index 0000000000..c531a4a021 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNePoseTposePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_pose_tpose`. + * + * Ever ne pose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNePoseTposePhysicalFunction : public PhysicalFunctionConcept { +public: + EverNePoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..471b8a7aaa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tbigint_bigint`. + * + * Per-event ever_ne_tbigint_bigint: ever-not-equal tbigint vs scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..e9ba883b80 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tbool_bool`. + * + * Per-event ever_ne_tbool_bool: ever-not-equal tbool vs scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..3eead53225 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tcbuffer_cbuffer`. + * + * Per-event ever_ne_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTcbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..5e1a09d2e3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tcbuffer_tcbuffer`. + * + * Per-event ever_ne_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..5e13b04f8a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_temporal_temporal`. + * + * Per-event ever_ne_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..5171ac0002 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_text_ttext(txt0, temp)`. + * + * Ever nequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..2073f2c79b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tfloat_float`. + * + * Per-event ever_ne_tfloat_float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..c8b1214c26 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tgeo_geo`. + * + * Per-event ever_ne_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..b78623271b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tgeo_tgeo`. + * + * Per-event ever_ne_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.hpp new file mode 100644 index 0000000000..5d89cd69fc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_th3index_h3index(temp, (H3Index)arg0)`. + * + * Ever neual th3index vs h3index + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTh3indexH3indexPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..ff9a069333 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tint_int`. + * + * Per-event ever_ne_tint_int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..0b8402e8ed --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tjsonb_jsonb`. + * + * Ever neual tjsonb vs jsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTjsonbJsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.hpp new file mode 100644 index 0000000000..bc7e513009 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tjsonb_tjsonb`. + * + * Ever neual tjsonb vs tjsonb + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTjsonbTjsonbPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTnpointNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTnpointNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..b8a2d8d242 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTnpointNpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tnpoint_npoint`. + * + * Ever ne tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTnpointNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..e608289168 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tnpoint_tnpoint`. + * + * Ever ne tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTnpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTposePosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTposePosePhysicalFunction.hpp new file mode 100644 index 0000000000..ff1cec26b0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTposePosePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tpose_pose`. + * + * Ever ne tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTposePosePhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTposeTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTposeTposePhysicalFunction.hpp new file mode 100644 index 0000000000..872dc90ace --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTposeTposePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tpose_tpose`. + * + * Ever ne tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTposeTposePhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.hpp new file mode 100644 index 0000000000..531e0a4e22 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_tquadbin_quadbin(temp, (Quadbin)arg0)`. + * + * Ever neual tquadbin vs quadbin + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTquadbinQuadbinPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..b966003db8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EverNeTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..98824f26d6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class EverNeTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/EverNeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/EverNeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..0a8eaaec49 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/EverNeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ever_ne_ttext_text(temp, txt0)`. + * + * Ever nequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class EverNeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + EverNeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FloatspanLowerIncPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FloatspanLowerIncPhysicalFunction.hpp new file mode 100644 index 0000000000..df7ca32892 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FloatspanLowerIncPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `span_lower_inc`. + * + * Floatspan lower_inc + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FloatspanLowerIncPhysicalFunction : public PhysicalFunctionConcept { +public: + FloatspanLowerIncPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FloatspanLowerPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FloatspanLowerPhysicalFunction.hpp new file mode 100644 index 0000000000..92eba0c374 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FloatspanLowerPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `floatspan_lower`. + * + * Floatspan lower + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FloatspanLowerPhysicalFunction : public PhysicalFunctionConcept { +public: + FloatspanLowerPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FloatspanUpperIncPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FloatspanUpperIncPhysicalFunction.hpp new file mode 100644 index 0000000000..3bd13e5de4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FloatspanUpperIncPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `span_upper_inc`. + * + * Floatspan upper_inc + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FloatspanUpperIncPhysicalFunction : public PhysicalFunctionConcept { +public: + FloatspanUpperIncPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FloatspanUpperPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FloatspanUpperPhysicalFunction.hpp new file mode 100644 index 0000000000..1007fc20d9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FloatspanUpperPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `floatspan_upper`. + * + * Floatspan upper + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FloatspanUpperPhysicalFunction : public PhysicalFunctionConcept { +public: + FloatspanUpperPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FloatspanWidthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FloatspanWidthPhysicalFunction.hpp new file mode 100644 index 0000000000..d8541a233e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FloatspanWidthPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `floatspan_width`. + * + * Floatspan width + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FloatspanWidthPhysicalFunction : public PhysicalFunctionConcept { +public: + FloatspanWidthPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FrontStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FrontStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..24b4e6a964 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FrontStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `front_stbox_stbox`. + * + * Per-event front_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FrontStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + FrontStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FrontStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FrontStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..6e8a1ceaa7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FrontStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `front_stbox_tspatial`. + * + * Per-event front_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FrontStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + FrontStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FrontTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FrontTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..f06090be97 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FrontTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `front_tspatial_stbox`. + * + * Per-event front_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FrontTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + FrontTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/FrontTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/FrontTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..63f39aaedf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/FrontTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `front_tspatial_tspatial`. + * + * Per-event front_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class FrontTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + FrontTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoAsEwktPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoAsEwktPhysicalFunction.hpp new file mode 100644 index 0000000000..71650992f7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoAsEwktPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_as_ewkt(temp, (int)arg0)`. + * + * Geometry as EWKT + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoAsEwktPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoAsEwktPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoAsGeojsonPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoAsGeojsonPhysicalFunction.hpp new file mode 100644 index 0000000000..161cb301e6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoAsGeojsonPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_as_geojson(temp, (int)arg0, (int)arg1, nullptr)`. + * + * Geometry as GeoJSON + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoAsGeojsonPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoAsGeojsonPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoEqualsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoEqualsPhysicalFunction.hpp new file mode 100644 index 0000000000..dc8f738575 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoEqualsPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_equals`. + * + * Geometry equals + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoEqualsPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoEqualsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoGeoNPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoGeoNPhysicalFunction.hpp new file mode 100644 index 0000000000..fdffa991a9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoGeoNPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_geo_n(temp, (int)arg0)`. + * + * Nth geometry in collection + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoGeoNPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoGeoNPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoIsUnitaryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoIsUnitaryPhysicalFunction.hpp new file mode 100644 index 0000000000..d79836dcbd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoIsUnitaryPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_is_unitary`. + * + * Is geometry unitary + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoIsUnitaryPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoIsUnitaryPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoNumGeosPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoNumGeosPhysicalFunction.hpp new file mode 100644 index 0000000000..814504647c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoNumGeosPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_num_geos`. + * + * Count geometry components + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoNumGeosPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoNumGeosPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoNumPointsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoNumPointsPhysicalFunction.hpp new file mode 100644 index 0000000000..ced5d88d05 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoNumPointsPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_num_points`. + * + * Count geometry points + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoNumPointsPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoNumPointsPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoPointsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoPointsPhysicalFunction.hpp new file mode 100644 index 0000000000..a4baeec916 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoPointsPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_points`. + * + * Geometry geo points + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoPointsPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoPointsPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoReversePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoReversePhysicalFunction.hpp new file mode 100644 index 0000000000..e3b4f7e9ed --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoReversePhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_reverse`. + * + * Geometry geo reverse + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoReversePhysicalFunction : public PhysicalFunctionConcept { +public: + GeoReversePhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoRoundPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoRoundPhysicalFunction.hpp new file mode 100644 index 0000000000..eabf2d3397 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoRoundPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_round(temp, (int)dec)`. + * + * Round geometry coordinates + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoRoundPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoRoundPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoSamePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoSamePhysicalFunction.hpp new file mode 100644 index 0000000000..4579ada6cc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoSamePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_same`. + * + * Geometry same + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoSamePhysicalFunction : public PhysicalFunctionConcept { +public: + GeoSamePhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoSetSridPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoSetSridPhysicalFunction.hpp new file mode 100644 index 0000000000..131617606b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoSetSridPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_set_srid(temp, (int32_t)srid)`. + * + * Set geometry SRID + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoSetSridPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoSetSridPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoSridPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoSridPhysicalFunction.hpp new file mode 100644 index 0000000000..17325bfaca --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoSridPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_srid`. + * + * Get geometry SRID + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoSridPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoSridPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeoTransformPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeoTransformPhysicalFunction.hpp new file mode 100644 index 0000000000..bb039402fe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeoTransformPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geo_transform(temp, (int32_t)srid)`. + * + * Transform geometry SRID + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeoTransformPhysicalFunction : public PhysicalFunctionConcept { +public: + GeoTransformPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogAreaPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogAreaPhysicalFunction.hpp new file mode 100644 index 0000000000..2ea2c9c4af --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogAreaPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_area`. + * + * geog area + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogAreaPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogAreaPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogCentroidPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogCentroidPhysicalFunction.hpp new file mode 100644 index 0000000000..77626d8787 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogCentroidPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_centroid(temp, (bool)arg0)`. + * + * Geography centroid + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogCentroidPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogCentroidPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogDistancePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogDistancePhysicalFunction.hpp new file mode 100644 index 0000000000..03702ab8c5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogDistancePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_distance`. + * + * Geography distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogDistancePhysicalFunction : public PhysicalFunctionConcept { +public: + GeogDistancePhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogDwithinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogDwithinPhysicalFunction.hpp new file mode 100644 index 0000000000..c973d4839f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogDwithinPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_dwithin`. + * + * geog_dwithin with distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogDwithinPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogDwithinPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogIntersectsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogIntersectsPhysicalFunction.hpp new file mode 100644 index 0000000000..9b6ef97ffc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogIntersectsPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_intersects`. + * + * Geography intersects + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogIntersectsPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogIntersectsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogLengthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogLengthPhysicalFunction.hpp new file mode 100644 index 0000000000..44067de9f9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogLengthPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_length`. + * + * geog length + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogLengthPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogLengthPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogPerimeterPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogPerimeterPhysicalFunction.hpp new file mode 100644 index 0000000000..3c91dba2fa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogPerimeterPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_perimeter`. + * + * geog perimeter + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogPerimeterPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogPerimeterPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogPointMake2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogPointMake2dPhysicalFunction.hpp new file mode 100644 index 0000000000..ac7e9173d8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogPointMake2dPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geogpoint_make2d((int32_t)srid, x, y)`. + * + * Make 2D geography point + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogPointMake2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogPointMake2dPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogPointMake3dzPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogPointMake3dzPhysicalFunction.hpp new file mode 100644 index 0000000000..919d75374b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogPointMake3dzPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geogpoint_make3dz((int32_t)srid, x, y, z)`. + * + * Make 3D geography point + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogPointMake3dzPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogPointMake3dzPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction zFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeogToGeomPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeogToGeomPhysicalFunction.hpp new file mode 100644 index 0000000000..138c125997 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeogToGeomPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geog_to_geom`. + * + * geog to geom + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeogToGeomPhysicalFunction : public PhysicalFunctionConcept { +public: + GeogToGeomPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomAzimuthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomAzimuthPhysicalFunction.hpp new file mode 100644 index 0000000000..9c931903ad --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomAzimuthPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_azimuth`. + * + * Geometry azimuth (single point) + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomAzimuthPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomAzimuthPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomBoundaryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomBoundaryPhysicalFunction.hpp new file mode 100644 index 0000000000..a1f1039513 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomBoundaryPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_boundary`. + * + * Geometry geom boundary + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomBoundaryPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomBoundaryPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomCentroidPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomCentroidPhysicalFunction.hpp new file mode 100644 index 0000000000..501a04b43a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomCentroidPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_centroid`. + * + * Geometry geom centroid + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomCentroidPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomCentroidPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomContainsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomContainsPhysicalFunction.hpp new file mode 100644 index 0000000000..bcfa0ae1c6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomContainsPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_contains`. + * + * Geometry contains + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomContainsPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomContainsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomConvexHullPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomConvexHullPhysicalFunction.hpp new file mode 100644 index 0000000000..f99a7c4a6c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomConvexHullPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_convex_hull`. + * + * Geometry geom convex hull + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomConvexHullPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomConvexHullPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomCoversPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomCoversPhysicalFunction.hpp new file mode 100644 index 0000000000..27ff29fd18 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomCoversPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_covers`. + * + * Geometry covers + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomCoversPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomCoversPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDifference2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDifference2dPhysicalFunction.hpp new file mode 100644 index 0000000000..f8ed39138f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDifference2dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_difference2d`. + * + * geom_difference2d + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDifference2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDifference2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDisjoint2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDisjoint2dPhysicalFunction.hpp new file mode 100644 index 0000000000..a5aae0e8da --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDisjoint2dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_disjoint2d`. + * + * Geometry disjoint 2D + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDisjoint2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDisjoint2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDistance2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDistance2dPhysicalFunction.hpp new file mode 100644 index 0000000000..c25ab64449 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDistance2dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_distance2d`. + * + * Geometry 2D distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDistance2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDistance2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDistance3dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDistance3dPhysicalFunction.hpp new file mode 100644 index 0000000000..3797576614 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDistance3dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_distance3d`. + * + * Geometry 3D distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDistance3dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDistance3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDwithin2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDwithin2dPhysicalFunction.hpp new file mode 100644 index 0000000000..3cb8500f39 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDwithin2dPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_dwithin2d`. + * + * geom_dwithin2d with distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDwithin2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDwithin2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDwithin3dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDwithin3dPhysicalFunction.hpp new file mode 100644 index 0000000000..0f987f800f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDwithin3dPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_dwithin3d`. + * + * geom_dwithin3d with distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDwithin3dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDwithin3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomDwithinPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomDwithinPhysicalFunction.hpp new file mode 100644 index 0000000000..bbbe73c42b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomDwithinPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_dwithin`. + * + * geom_dwithin with distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomDwithinPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomDwithinPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomIntersection2dCollPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomIntersection2dCollPhysicalFunction.hpp new file mode 100644 index 0000000000..85e2c338df --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomIntersection2dCollPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_intersection2d_coll`. + * + * geom_intersection2d_coll + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomIntersection2dCollPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomIntersection2dCollPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomIntersection2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomIntersection2dPhysicalFunction.hpp new file mode 100644 index 0000000000..21a8478952 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomIntersection2dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_intersection2d`. + * + * geom_intersection2d + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomIntersection2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomIntersection2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomIntersects2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomIntersects2dPhysicalFunction.hpp new file mode 100644 index 0000000000..173ee38533 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomIntersects2dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_intersects2d`. + * + * Geometry intersects 2D + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomIntersects2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomIntersects2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomIntersects3dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomIntersects3dPhysicalFunction.hpp new file mode 100644 index 0000000000..9ab5a74d00 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomIntersects3dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_intersects3d`. + * + * Geometry intersects 3D + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomIntersects3dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomIntersects3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomIntersectsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomIntersectsPhysicalFunction.hpp new file mode 100644 index 0000000000..026db3f455 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomIntersectsPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_intersects`. + * + * Geometry intersects + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomIntersectsPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomIntersectsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomIsEmptyPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomIsEmptyPhysicalFunction.hpp new file mode 100644 index 0000000000..43f671cba6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomIsEmptyPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_is_empty`. + * + * Is geometry empty + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomIsEmptyPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomIsEmptyPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomLengthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomLengthPhysicalFunction.hpp new file mode 100644 index 0000000000..aa41303be7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomLengthPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_length`. + * + * Geometry length + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomLengthPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomLengthPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomPerimeterPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomPerimeterPhysicalFunction.hpp new file mode 100644 index 0000000000..f15765c748 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomPerimeterPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_perimeter`. + * + * Geometry perimeter + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomPerimeterPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomPerimeterPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomPointMake2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomPointMake2dPhysicalFunction.hpp new file mode 100644 index 0000000000..bf055859c2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomPointMake2dPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geompoint_make2d((int32_t)srid, x, y)`. + * + * Make 2D geometry point + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomPointMake2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomPointMake2dPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomPointMake3dzPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomPointMake3dzPhysicalFunction.hpp new file mode 100644 index 0000000000..bf5963d902 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomPointMake3dzPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geompoint_make3dz((int32_t)srid, x, y, z)`. + * + * Make 3D geometry point + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomPointMake3dzPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomPointMake3dzPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction zFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomShortestline2dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomShortestline2dPhysicalFunction.hpp new file mode 100644 index 0000000000..d10e6857aa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomShortestline2dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_shortestline2d`. + * + * geom_shortestline2d + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomShortestline2dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomShortestline2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomShortestline3dPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomShortestline3dPhysicalFunction.hpp new file mode 100644 index 0000000000..599aaa654e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomShortestline3dPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_shortestline3d`. + * + * geom_shortestline3d + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomShortestline3dPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomShortestline3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomToGeogPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomToGeogPhysicalFunction.hpp new file mode 100644 index 0000000000..33683f09d6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomToGeogPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_to_geog`. + * + * geom to geog + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomToGeogPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomToGeogPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomTouchesPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomTouchesPhysicalFunction.hpp new file mode 100644 index 0000000000..bdd8453cda --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomTouchesPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_touches`. + * + * Geometry touches + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomTouchesPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomTouchesPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/GeomUnaryUnionPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/GeomUnaryUnionPhysicalFunction.hpp new file mode 100644 index 0000000000..03d5e43e62 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/GeomUnaryUnionPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `geom_unary_union`. + * + * Geometry geom unary union + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class GeomUnaryUnionPhysicalFunction : public PhysicalFunctionConcept { +public: + GeomUnaryUnionPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexCmpPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexCmpPhysicalFunction.hpp new file mode 100644 index 0000000000..7752ca4386 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexCmpPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_cmp((H3Index)a, (H3Index)b)`. + * + * H3Index comparison (cmp) + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexCmpPhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexCmpPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexEqPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexEqPhysicalFunction.hpp new file mode 100644 index 0000000000..a42bbf4625 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexEqPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_eq((H3Index)a, (H3Index)b)`. + * + * H3Index eq comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexEqPhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexEqPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexGePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexGePhysicalFunction.hpp new file mode 100644 index 0000000000..e9e9f248a7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexGePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_ge((H3Index)a, (H3Index)b)`. + * + * H3Index ge comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexGePhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexGePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexGtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexGtPhysicalFunction.hpp new file mode 100644 index 0000000000..c5417f7917 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexGtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_gt((H3Index)a, (H3Index)b)`. + * + * H3Index gt comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexGtPhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexGtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexLePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexLePhysicalFunction.hpp new file mode 100644 index 0000000000..e2b398d970 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexLePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_le((H3Index)a, (H3Index)b)`. + * + * H3Index le comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexLePhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexLePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexLtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexLtPhysicalFunction.hpp new file mode 100644 index 0000000000..d979cc6226 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexLtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_lt((H3Index)a, (H3Index)b)`. + * + * H3Index lt comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexLtPhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexLtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexNePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexNePhysicalFunction.hpp new file mode 100644 index 0000000000..662ef33442 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexNePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_ne((H3Index)a, (H3Index)b)`. + * + * H3Index ne comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexNePhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexNePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/H3indexOutPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/H3indexOutPhysicalFunction.hpp new file mode 100644 index 0000000000..e1f8c2ca08 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/H3indexOutPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `h3index_out((H3Index)cell)`. + * + * H3Index to hex string + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class H3indexOutPhysicalFunction : public PhysicalFunctionConcept { +public: + H3indexOutPhysicalFunction(PhysicalFunction cellFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/IntspanLowerIncPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/IntspanLowerIncPhysicalFunction.hpp new file mode 100644 index 0000000000..22fccfde10 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/IntspanLowerIncPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `span_lower_inc`. + * + * Intspan lower_inc + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class IntspanLowerIncPhysicalFunction : public PhysicalFunctionConcept { +public: + IntspanLowerIncPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/IntspanLowerPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/IntspanLowerPhysicalFunction.hpp new file mode 100644 index 0000000000..d969ab5443 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/IntspanLowerPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `intspan_lower`. + * + * Intspan lower + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class IntspanLowerPhysicalFunction : public PhysicalFunctionConcept { +public: + IntspanLowerPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/IntspanUpperIncPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/IntspanUpperIncPhysicalFunction.hpp new file mode 100644 index 0000000000..553a9e0051 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/IntspanUpperIncPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `span_upper_inc`. + * + * Intspan upper_inc + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class IntspanUpperIncPhysicalFunction : public PhysicalFunctionConcept { +public: + IntspanUpperIncPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/IntspanUpperPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/IntspanUpperPhysicalFunction.hpp new file mode 100644 index 0000000000..8774d38cd8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/IntspanUpperPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `intspan_upper`. + * + * Intspan upper + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class IntspanUpperPhysicalFunction : public PhysicalFunctionConcept { +public: + IntspanUpperPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/IntspanWidthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/IntspanWidthPhysicalFunction.hpp new file mode 100644 index 0000000000..a589bc8f54 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/IntspanWidthPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `intspan_width`. + * + * Intspan width + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class IntspanWidthPhysicalFunction : public PhysicalFunctionConcept { +public: + IntspanWidthPhysicalFunction(PhysicalFunction spFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbArrayElementTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbArrayElementTextPhysicalFunction.hpp new file mode 100644 index 0000000000..c7889febf0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbArrayElementTextPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_array_element_text(temp, (int)idx_d)`. + * + * Jsonb array element text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbArrayElementTextPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbArrayElementTextPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbArrayLengthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbArrayLengthPhysicalFunction.hpp new file mode 100644 index 0000000000..b9a6d6f507 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbArrayLengthPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_array_length(temp)`. + * + * Jsonb array length + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbArrayLengthPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbArrayLengthPhysicalFunction(PhysicalFunction jbFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbCmpPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbCmpPhysicalFunction.hpp new file mode 100644 index 0000000000..1aadaa022e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbCmpPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_cmp(temp, jb0)`. + * + * Jsonb cmp + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbCmpPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbCmpPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbContainedPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbContainedPhysicalFunction.hpp new file mode 100644 index 0000000000..35e7b75237 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbContainedPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_contained(temp, jb0)`. + * + * Jsonb contained + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbContainedPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbContainedPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbContainsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbContainsPhysicalFunction.hpp new file mode 100644 index 0000000000..0134fb6bbe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbContainsPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_contains(temp, jb0)`. + * + * Jsonb contains + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbContainsPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbContainsPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbEqPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbEqPhysicalFunction.hpp new file mode 100644 index 0000000000..c36694cced --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbEqPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_eq(temp, jb0)`. + * + * Jsonb eq comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbEqPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbEqPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbExistsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbExistsPhysicalFunction.hpp new file mode 100644 index 0000000000..65fb81c556 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbExistsPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_exists(temp, txt0)`. + * + * Jsonb exists key + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbExistsPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbExistsPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbGePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbGePhysicalFunction.hpp new file mode 100644 index 0000000000..6d7b99caee --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbGePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_ge(temp, jb0)`. + * + * Jsonb ge comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbGePhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbGePhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbGtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbGtPhysicalFunction.hpp new file mode 100644 index 0000000000..1330c793d7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbGtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_gt(temp, jb0)`. + * + * Jsonb gt comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbGtPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbGtPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbLePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbLePhysicalFunction.hpp new file mode 100644 index 0000000000..03c7e29ab8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbLePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_le(temp, jb0)`. + * + * Jsonb le comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbLePhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbLePhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbLtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbLtPhysicalFunction.hpp new file mode 100644 index 0000000000..f1f1367c6b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbLtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_lt(temp, jb0)`. + * + * Jsonb lt comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbLtPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbLtPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbNePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbNePhysicalFunction.hpp new file mode 100644 index 0000000000..cc8d0ae1ac --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbNePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_ne(temp, jb0)`. + * + * Jsonb ne comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbNePhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbNePhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.hpp new file mode 100644 index 0000000000..bad798e2aa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_object_field_text(temp, txt0)`. + * + * Jsonb object field text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbObjectFieldTextPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbObjectFieldTextPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbPrettyPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbPrettyPhysicalFunction.hpp new file mode 100644 index 0000000000..656fb7c24f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbPrettyPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_pretty(temp)`. + * + * Jsonb pretty print + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbPrettyPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbPrettyPhysicalFunction(PhysicalFunction jbFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/JsonbToCstringPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/JsonbToCstringPhysicalFunction.hpp new file mode 100644 index 0000000000..d1b1a75464 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/JsonbToCstringPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `jsonb_to_cstring(temp)`. + * + * Jsonb to cstring + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class JsonbToCstringPhysicalFunction : public PhysicalFunctionConcept { +public: + JsonbToCstringPhysicalFunction(PhysicalFunction jbFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..039470f3c6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_stbox_stbox`. + * + * Per-event left_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..479def538f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_stbox_tspatial`. + * + * Per-event left_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..7c3f712201 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_tbox_tnumber`. + * + * Per-event left_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..da8bd023ee --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_tnumber_tbox`. + * + * Per-event left_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..d030f01fa2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_tnumber_tnumber`. + * + * Per-event left_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..75fe9de6e2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_tspatial_stbox`. + * + * Per-event left_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LeftTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LeftTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..6392f24e37 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LeftTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `left_tspatial_tspatial`. + * + * Per-event left_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LeftTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + LeftTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LineInterpolatePointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LineInterpolatePointPhysicalFunction.hpp new file mode 100644 index 0000000000..bef68009b8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LineInterpolatePointPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `line_interpolate_point(temp, arg0)`. + * + * Interpolate point on line + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LineInterpolatePointPhysicalFunction : public PhysicalFunctionConcept { +public: + LineInterpolatePointPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LineLocatePointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LineLocatePointPhysicalFunction.hpp new file mode 100644 index 0000000000..ea56a76582 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LineLocatePointPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `line_locate_point`. + * + * Locate point on line + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LineLocatePointPhysicalFunction : public PhysicalFunctionConcept { +public: + LineLocatePointPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LineNumpointsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LineNumpointsPhysicalFunction.hpp new file mode 100644 index 0000000000..8c14754e9a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LineNumpointsPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `line_numpoints(temp)`. + * + * Line num points + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LineNumpointsPhysicalFunction : public PhysicalFunctionConcept { +public: + LineNumpointsPhysicalFunction(PhysicalFunction wktFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LinePointNPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LinePointNPhysicalFunction.hpp new file mode 100644 index 0000000000..82656a618d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LinePointNPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `line_point_n(temp, (int)arg0)`. + * + * Nth point on line + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LinePointNPhysicalFunction : public PhysicalFunctionConcept { +public: + LinePointNPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/LineSubstringPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/LineSubstringPhysicalFunction.hpp new file mode 100644 index 0000000000..f26e72fd64 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/LineSubstringPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `line_substring(temp, arg0, arg1)`. + * + * Line substring + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class LineSubstringPhysicalFunction : public PhysicalFunctionConcept { +public: + LineSubstringPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..556259f4be --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mindistance_tcbuffer_tcbuffer`. + * + * Per-event minimum distance between two tcbuffer instants within threshold. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MindistanceTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + MindistanceTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..6edb9007e9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_bigint_tbigint`. + * + * Per-event mul_bigint_tbigint: scalar bigint times single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + MulBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..50d4a3d60f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_float_tfloat`. + * + * Per-event mul_float_tfloat: scalar float times single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + MulFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..a082e36f87 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_int_tint`. + * + * Per-event mul_int_tint: scalar int times single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + MulIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..8f9f13d716 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_tbigint_bigint`. + * + * Per-event mul_tbigint_bigint: single-instant tbigint times scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + MulTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..e63403d614 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_tfloat_float`. + * + * Per-event mul_tfloat_float: single-instant tfloat times scalar float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + MulTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..eb4dab785a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_tint_int`. + * + * Per-event mul_tint_int: single-instant tint times scalar int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + MulTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MulTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MulTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..8d2bea7a57 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MulTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_tnumber_tnumber`. + * + * Per-event mul_tnumber_tnumber: two temporal numbers multiplied (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MulTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + MulTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/MultTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/MultTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..9da5d29efb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/MultTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `mul_tnumber_tnumber`. + * + * Per-event mul_tnumber_tnumber over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class MultTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + MultTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..5c46ab6163 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_stbox_stbox`. + * + * Per-event nad_stbox_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTcbufferGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTcbufferGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..b9bc5cece1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTcbufferGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tcbuffer_geo`. + * + * Per-event nearest approach distance between tcbuffer and static geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTcbufferGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTcbufferStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTcbufferStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..f7dd38d361 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTcbufferStboxPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tcbuffer_stbox`. + * + * Per-event nad_tcbuffer_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTcbufferStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTcbufferStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..c6773eb42b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tcbuffer_tcbuffer`. + * + * Per-event nearest approach distance between two tcbuffer instants. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTfloatTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTfloatTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..670d4f591b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTfloatTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tfloat_tbox`. + * + * Per-event nad_tfloat_tbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTfloatTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTfloatTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTgeoGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTgeoGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..d9e153e9eb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTgeoGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_geo`. + * + * Per-event nearest approach distance between tgeo and static geometry. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTgeoGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTgeoStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTgeoStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..4b8a0d7cca --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTgeoStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_stbox`. + * + * Per-event nad_tgeo_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTgeoStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTgeoStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..1b59fbde86 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_tgeo`. + * + * Per-event nearest approach distance between two tgeo instants. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTintTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTintTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..0f72f8b988 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTintTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tint_tbox`. + * + * Per-event nad_tint_tbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTintTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTintTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTnpointGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTnpointGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..1b2919bc98 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTnpointGeoPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tnpoint_geo(temp, gs0)`. + * + * NAD tnpoint vs geo + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTnpointGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTnpointGeoPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTnpointNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTnpointNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..66d0c844f5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTnpointNpointPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tnpoint_npoint(temp, np0)`. + * + * NAD tnpoint vs npoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTnpointNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTnpointStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTnpointStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..2650290af3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTnpointStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tnpoint_stbox`. + * + * Per-event nad_tnpoint_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTnpointStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTnpointStboxPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTnpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTnpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..12d366a551 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTnpointTnpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tnpoint_tnpoint(temp, inst0)`. + * + * NAD tnpoint vs tnpoint + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTnpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTposeGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTposeGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..73b8feb82e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTposeGeoPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tpose_geo(temp, gs0)`. + * + * NAD tpose vs geo + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTposeGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTposeGeoPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTposePosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTposePosePhysicalFunction.hpp new file mode 100644 index 0000000000..f94958ba00 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTposePosePhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tpose_pose(temp, pose0)`. + * + * NAD tpose vs pose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTposePosePhysicalFunction : public PhysicalFunctionConcept { +public: + NadTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTposeStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTposeStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..3bd4ec8a8f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTposeStboxPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tpose_stbox`. + * + * Per-event nad_tpose_stbox distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTposeStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTposeStboxPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTposeTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTposeTposePhysicalFunction.hpp new file mode 100644 index 0000000000..19d8b6a93c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTposeTposePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tpose_tpose(temp, inst0)`. + * + * NAD tpose vs tpose + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class NadTposeTposePhysicalFunction : public PhysicalFunctionConcept { +public: + NadTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTrgeometryGeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTrgeometryGeoPhysicalFunction.hpp new file mode 100644 index 0000000000..7ed02a4613 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTrgeometryGeoPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class NadTrgeometryGeoPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..b138dd9908 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.hpp @@ -0,0 +1,32 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +class NadTrgeometryTrgeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + NadTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2); + VarVal execute(const Record& record, ArenaRef& arena) const override; +private: + std::vector paramFns; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OveraboveStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OveraboveStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..d69fcdcb36 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OveraboveStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overabove_stbox_stbox`. + * + * Per-event overabove_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OveraboveStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OveraboveStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..d647353c72 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overabove_stbox_tspatial`. + * + * Per-event overabove_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OveraboveStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OveraboveStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..9973099384 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overabove_tspatial_stbox`. + * + * Per-event overabove_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OveraboveTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OveraboveTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..cf7205c6f2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overabove_tspatial_tspatial`. + * + * Per-event overabove_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OveraboveTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OveraboveTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..3cd159467c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_stbox_stbox`. + * + * Per-event overafter_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..1d4f77eee6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_stbox_tspatial`. + * + * Per-event overafter_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..18aa607ded --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_tbox_tnumber`. + * + * Per-event overafter_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..4739526b3c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_temporal_temporal`. + * + * Per-event overafter_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..6dc8b51187 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_tnumber_tbox`. + * + * Per-event overafter_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..bbacce3b8f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_tnumber_tnumber`. + * + * Per-event overafter_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..8732fc3cdf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_tspatial_stbox`. + * + * Per-event overafter_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..e2540837bf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overafter_tspatial_tspatial`. + * + * Per-event overafter_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverafterTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverafterTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbackStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbackStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..559e7c4ba2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbackStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overback_stbox_stbox`. + * + * Per-event overback_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbackStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbackStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbackStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbackStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..b5d4812d17 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbackStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overback_stbox_tspatial`. + * + * Per-event overback_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbackStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbackStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbackTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbackTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..05f25afab4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbackTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overback_tspatial_stbox`. + * + * Per-event overback_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbackTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbackTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..c35cc4e4d6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overback_tspatial_tspatial`. + * + * Per-event overback_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbackTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbackTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..3c70363deb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_stbox_stbox`. + * + * Per-event overbefore_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..93961ce5dd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_stbox_tspatial`. + * + * Per-event overbefore_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..e7207cc407 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_tbox_tnumber`. + * + * Per-event overbefore_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..1dc74ebb26 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_temporal_temporal`. + * + * Per-event overbefore_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..da7dbdb7f1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_tnumber_tbox`. + * + * Per-event overbefore_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..31a4f89f52 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_tnumber_tnumber`. + * + * Per-event overbefore_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..bbb47a325b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_tspatial_stbox`. + * + * Per-event overbefore_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..5e45951f5e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbefore_tspatial_tspatial`. + * + * Per-event overbefore_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbeforeTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbeforeTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbelowStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbelowStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..699a7f8f35 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbelowStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbelow_stbox_stbox`. + * + * Per-event overbelow_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbelowStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbelowStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..0a5f563467 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbelow_stbox_tspatial`. + * + * Per-event overbelow_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbelowStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbelowStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..f5d0b25dea --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbelow_tspatial_stbox`. + * + * Per-event overbelow_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbelowTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbelowTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..82bf3bdc2b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overbelow_tspatial_tspatial`. + * + * Per-event overbelow_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverbelowTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverbelowTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverfrontStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverfrontStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..e08ec8ac8b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverfrontStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overfront_stbox_stbox`. + * + * Per-event overfront_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverfrontStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverfrontStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..ca14428c29 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overfront_stbox_tspatial`. + * + * Per-event overfront_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverfrontStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverfrontStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..9c63f137ca --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overfront_tspatial_stbox`. + * + * Per-event overfront_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverfrontTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverfrontTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..876a2f6b88 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overfront_tspatial_tspatial`. + * + * Per-event overfront_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverfrontTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverfrontTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..e050af178c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_stbox_stbox`. + * + * Per-event overlaps_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..b8d4507826 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_stbox_tspatial`. + * + * Per-event overlaps_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..dcdda3de28 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_tbox_tnumber`. + * + * Per-event overlaps_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..13596fe274 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_temporal_temporal`. + * + * Per-event overlaps_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..740015ecf7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_tnumber_tbox`. + * + * Per-event overlaps_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..faa87823c6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_tnumber_tnumber`. + * + * Per-event overlaps_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..0cec803a00 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_tspatial_stbox`. + * + * Per-event overlaps_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..4ac516fa68 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overlaps_tspatial_tspatial`. + * + * Per-event overlaps_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverlapsTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverlapsTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..33628d693a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_stbox_stbox`. + * + * Per-event overleft_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..fbbcd73a6d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_stbox_tspatial`. + * + * Per-event overleft_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..c82a91d83c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_tbox_tnumber`. + * + * Per-event overleft_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..bf695040ab --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_tnumber_tbox`. + * + * Per-event overleft_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..fb6d37d49f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_tnumber_tnumber`. + * + * Per-event overleft_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..e1bef3aee0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_tspatial_stbox`. + * + * Per-event overleft_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..10bcb44fd0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overleft_tspatial_tspatial`. + * + * Per-event overleft_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverleftTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverleftTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..045669e406 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_stbox_stbox`. + * + * Per-event overright_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..25901d5e09 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_stbox_tspatial`. + * + * Per-event overright_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..bbbcdf8e9e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_tbox_tnumber`. + * + * Per-event overright_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..fa41af9c55 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_tnumber_tbox`. + * + * Per-event overright_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..bc212e9a76 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_tnumber_tnumber`. + * + * Per-event overright_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..199c53ce7d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_tspatial_stbox`. + * + * Per-event overright_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..0805516d41 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `overright_tspatial_tspatial`. + * + * Per-event overright_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class OverrightTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + OverrightTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinCellAreaPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinCellAreaPhysicalFunction.hpp new file mode 100644 index 0000000000..53a4c2aac4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinCellAreaPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_cell_area((Quadbin)cell)`. + * + * Quadbin cell area + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinCellAreaPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinCellAreaPhysicalFunction(PhysicalFunction cellFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinCellToParentPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinCellToParentPhysicalFunction.hpp new file mode 100644 index 0000000000..c978cd386c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinCellToParentPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_cell_to_parent((Quadbin)cell, (uint32_t)res)`. + * + * Quadbin cell to parent + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinCellToParentPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinCellToParentPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction resFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.hpp new file mode 100644 index 0000000000..0664cf281d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_cell_to_quadkey((Quadbin)cell)`. + * + * Quadbin cell to quadkey + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinCellToQuadkeyPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinCellToQuadkeyPhysicalFunction(PhysicalFunction cellFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinCmpPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinCmpPhysicalFunction.hpp new file mode 100644 index 0000000000..180b316f7b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinCmpPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_cmp((Quadbin)a, (Quadbin)b)`. + * + * Quadbin cmp + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinCmpPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinCmpPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinEqPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinEqPhysicalFunction.hpp new file mode 100644 index 0000000000..12fe1a3b62 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinEqPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_eq((Quadbin)a, (Quadbin)b)`. + * + * Quadbin eq comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinEqPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinEqPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinGePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinGePhysicalFunction.hpp new file mode 100644 index 0000000000..c4a8a7aec5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinGePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_ge((Quadbin)a, (Quadbin)b)`. + * + * Quadbin ge comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinGePhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinGePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinGetResolutionPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinGetResolutionPhysicalFunction.hpp new file mode 100644 index 0000000000..5b18ac3cde --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinGetResolutionPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_get_resolution((Quadbin)cell)`. + * + * Quadbin get resolution + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinGetResolutionPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinGetResolutionPhysicalFunction(PhysicalFunction cellFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinGtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinGtPhysicalFunction.hpp new file mode 100644 index 0000000000..1f9664e14b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinGtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_gt((Quadbin)a, (Quadbin)b)`. + * + * Quadbin gt comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinGtPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinGtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinIsValidCellPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinIsValidCellPhysicalFunction.hpp new file mode 100644 index 0000000000..6ee112a436 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinIsValidCellPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_is_valid_cell((Quadbin)cell)`. + * + * Quadbin is valid cell + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinIsValidCellPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinIsValidCellPhysicalFunction(PhysicalFunction cellFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinLePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinLePhysicalFunction.hpp new file mode 100644 index 0000000000..f56939adc6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinLePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_le((Quadbin)a, (Quadbin)b)`. + * + * Quadbin le comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinLePhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinLePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinLtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinLtPhysicalFunction.hpp new file mode 100644 index 0000000000..dbc0d0c90b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinLtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_lt((Quadbin)a, (Quadbin)b)`. + * + * Quadbin lt comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinLtPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinLtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinNePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinNePhysicalFunction.hpp new file mode 100644 index 0000000000..98d22d69fe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinNePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_ne((Quadbin)a, (Quadbin)b)`. + * + * Quadbin ne comparison + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinNePhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinNePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinPointToCellPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinPointToCellPhysicalFunction.hpp new file mode 100644 index 0000000000..0da223264b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinPointToCellPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_point_to_cell(lon, lat, (uint32_t)res)`. + * + * Quadbin point to cell + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinPointToCellPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinPointToCellPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction resFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/QuadbinTileToCellPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/QuadbinTileToCellPhysicalFunction.hpp new file mode 100644 index 0000000000..9354d86b94 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/QuadbinTileToCellPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `quadbin_tile_to_cell((uint32_t)x, (uint32_t)y, (uint32_t)z)`. + * + * Quadbin tile to cell + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class QuadbinTileToCellPhysicalFunction : public PhysicalFunctionConcept { +public: + QuadbinTileToCellPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction zFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..6ee9d12d8b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_stbox_stbox`. + * + * Per-event right_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + RightStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..a2f1a7d3d2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_stbox_tspatial`. + * + * Per-event right_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + RightStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..b96f7bc5d0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_tbox_tnumber`. + * + * Per-event right_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + RightTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..64155d6375 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_tnumber_tbox`. + * + * Per-event right_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + RightTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..f533ea9f2c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_tnumber_tnumber`. + * + * Per-event right_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + RightTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..4643e1ad68 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_tspatial_stbox`. + * + * Per-event right_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + RightTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/RightTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/RightTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..9d69085b57 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/RightTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `right_tspatial_tspatial`. + * + * Per-event right_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class RightTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + RightTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameStboxStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameStboxStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..8d7a4199ad --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameStboxStboxPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_stbox_stbox`. + * + * Per-event same_stbox_stbox predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameStboxStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + SameStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameStboxTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameStboxTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..6fb0d44ee1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameStboxTspatialPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_stbox_tspatial`. + * + * Per-event same_stbox_tspatial predicate (stbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameStboxTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + SameStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameTboxTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameTboxTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..25250ccb4c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameTboxTnumberPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_tbox_tnumber`. + * + * Per-event same_tbox_tnumber predicate (tbox first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameTboxTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + SameTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameTemporalTemporalPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameTemporalTemporalPhysicalFunction.hpp new file mode 100644 index 0000000000..8342edd659 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameTemporalTemporalPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_temporal_temporal`. + * + * Per-event same_temporal_temporal. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameTemporalTemporalPhysicalFunction : public PhysicalFunctionConcept { +public: + SameTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameTnumberTboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameTnumberTboxPhysicalFunction.hpp new file mode 100644 index 0000000000..d837fb9f73 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameTnumberTboxPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_tnumber_tbox`. + * + * Per-event same_tnumber_tbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameTnumberTboxPhysicalFunction : public PhysicalFunctionConcept { +public: + SameTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..cd8c5d73c7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_tnumber_tnumber`. + * + * Per-event same_tnumber_tnumber predicate over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + SameTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameTspatialStboxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameTspatialStboxPhysicalFunction.hpp new file mode 100644 index 0000000000..5de36f8449 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameTspatialStboxPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_tspatial_stbox`. + * + * Per-event same_tspatial_stbox predicate (temporal first). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameTspatialStboxPhysicalFunction : public PhysicalFunctionConcept { +public: + SameTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SameTspatialTspatialPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SameTspatialTspatialPhysicalFunction.hpp new file mode 100644 index 0000000000..e0a5fdffd1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SameTspatialTspatialPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `same_tspatial_tspatial`. + * + * Per-event same_tspatial_tspatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SameTspatialTspatialPhysicalFunction : public PhysicalFunctionConcept { +public: + SameTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxCmpPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxCmpPhysicalFunction.hpp new file mode 100644 index 0000000000..b86bff355a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxCmpPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_cmp`. + * + * Per-event stbox_cmp comparison. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxCmpPhysicalFunction : public PhysicalFunctionConcept { +public: + StboxCmpPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxEqPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxEqPhysicalFunction.hpp new file mode 100644 index 0000000000..b6fb4e6dcb --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxEqPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_eq`. + * + * Per-event stbox_eq predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxEqPhysicalFunction : public PhysicalFunctionConcept { +public: + StboxEqPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxGePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxGePhysicalFunction.hpp new file mode 100644 index 0000000000..78344fc1c0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxGePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_ge`. + * + * Per-event stbox_ge predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxGePhysicalFunction : public PhysicalFunctionConcept { +public: + StboxGePhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxGtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxGtPhysicalFunction.hpp new file mode 100644 index 0000000000..2c5a15ea7f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxGtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_gt`. + * + * Per-event stbox_gt predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxGtPhysicalFunction : public PhysicalFunctionConcept { +public: + StboxGtPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxLePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxLePhysicalFunction.hpp new file mode 100644 index 0000000000..be2f2e2634 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxLePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_le`. + * + * Per-event stbox_le predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxLePhysicalFunction : public PhysicalFunctionConcept { +public: + StboxLePhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxLtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxLtPhysicalFunction.hpp new file mode 100644 index 0000000000..644e834453 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxLtPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_lt`. + * + * Per-event stbox_lt predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxLtPhysicalFunction : public PhysicalFunctionConcept { +public: + StboxLtPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/StboxNePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/StboxNePhysicalFunction.hpp new file mode 100644 index 0000000000..f7984706a5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/StboxNePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `stbox_ne`. + * + * Per-event stbox_ne predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class StboxNePhysicalFunction : public PhysicalFunctionConcept { +public: + StboxNePhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubBigintTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubBigintTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..c762fd1138 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubBigintTbigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_bigint_tbigint`. + * + * Per-event sub_bigint_tbigint: scalar bigint minus single-instant tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubBigintTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + SubBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubFloatTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubFloatTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..3df66dbc4f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubFloatTfloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_float_tfloat`. + * + * Per-event sub_float_tfloat: scalar float minus single-instant tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubFloatTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + SubFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubIntTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubIntTintPhysicalFunction.hpp new file mode 100644 index 0000000000..8cf0ecd9f8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubIntTintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_int_tint`. + * + * Per-event sub_int_tint: scalar int minus single-instant tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubIntTintPhysicalFunction : public PhysicalFunctionConcept { +public: + SubIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubTbigintBigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubTbigintBigintPhysicalFunction.hpp new file mode 100644 index 0000000000..3d348ffd4c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubTbigintBigintPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_tbigint_bigint`. + * + * Per-event sub_tbigint_bigint: single-instant tbigint minus scalar bigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubTbigintBigintPhysicalFunction : public PhysicalFunctionConcept { +public: + SubTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..4716b9a2cd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_tfloat_float`. + * + * Per-event sub_tfloat_float: single-instant tfloat minus scalar float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + SubTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..ef13975e5e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_tint_int`. + * + * Per-event sub_tint_int: single-instant tint minus scalar int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + SubTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/SubTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/SubTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..1d73f03e72 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/SubTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `sub_tnumber_tnumber`. + * + * Per-event sub_tnumber_tnumber: two temporal numbers subtracted (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class SubTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + SubTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TEqTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TEqTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..545311853e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TEqTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `teq_text_ttext(txt0, temp)`. + * + * Temporal eqqual text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TEqTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TEqTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TEqTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TEqTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..c9886b4e9a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TEqTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `teq_ttext_text(temp, txt0)`. + * + * Temporal eqqual ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TEqTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TEqTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TGeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TGeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..d0edf1d7cc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TGeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tge_text_ttext(txt0, temp)`. + * + * Temporal ge text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TGeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TGeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TGeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TGeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..1a3b55cf29 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TGeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tge_ttext_text(temp, txt0)`. + * + * Temporal ge ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TGeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TGeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TGtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TGtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..954726161c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TGtTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tgt_text_ttext(txt0, temp)`. + * + * Temporal gt text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TGtTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TGtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TGtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TGtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..473fabfcee --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TGtTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tgt_ttext_text(temp, txt0)`. + * + * Temporal gt ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TGtTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TGtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TLeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TLeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..6cce9376c7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TLeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tle_text_ttext(txt0, temp)`. + * + * Temporal le text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TLeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TLeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TLeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TLeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..fa116dd48d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TLeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tle_ttext_text(temp, txt0)`. + * + * Temporal le ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TLeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TLeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TLtTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TLtTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..9efc932da8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TLtTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tlt_text_ttext(txt0, temp)`. + * + * Temporal lt text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TLtTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TLtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TLtTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TLtTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..2d339975cf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TLtTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tlt_ttext_text(temp, txt0)`. + * + * Temporal lt ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TLtTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TLtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TNeTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TNeTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..59acfa8bee --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TNeTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tne_text_ttext(txt0, temp)`. + * + * Temporal nequal text vs ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TNeTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TNeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TNeTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TNeTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..1c0159cf9d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TNeTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tne_ttext_text(temp, txt0)`. + * + * Temporal nequal ttext vs text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TNeTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TNeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TandBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TandBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..cda51805f8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TandBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tand_bool_tbool`. + * + * Per-event tand_bool_tbool: temporal AND of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TandBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TandBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TandTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TandTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..2d38f30eab --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TandTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tand_tbool_bool`. + * + * Per-event tand_tbool_bool: temporal AND of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TandTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + TandTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TandTboolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TandTboolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..e5d7c1a631 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TandTboolTboolPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tand_tbool_tbool`. + * + * Per-event tand_tbool_tbool: temporal AND of two tbool values (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TandTboolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TandTboolTboolPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TbigintScaleValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TbigintScaleValuePhysicalFunction.hpp new file mode 100644 index 0000000000..c3c528ec58 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TbigintScaleValuePhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbigint_scale_value`. + * + * Per-event tbigint_scale_value: scale single-instant tbigint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TbigintScaleValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TbigintScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.hpp new file mode 100644 index 0000000000..df177fd010 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbigint_shift_scale_value`. + * + * Per-event tbigint_shift_scale_value: shift then scale single-instant tbigint value. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TbigintShiftScaleValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TbigintShiftScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TbigintShiftValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TbigintShiftValuePhysicalFunction.hpp new file mode 100644 index 0000000000..2b4b8894d8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TbigintShiftValuePhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbigint_shift_value`. + * + * Per-event tbigint_shift_value: shift single-instant tbigint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TbigintShiftValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TbigintShiftValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TbigintToTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TbigintToTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..763217b93b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TbigintToTfloatPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbigint_to_tfloat`. + * + * Per-event tbigint_to_tfloat: convert single-instant tbigint to tfloat. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TbigintToTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TbigintToTfloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TbigintToTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TbigintToTintPhysicalFunction.hpp new file mode 100644 index 0000000000..3b5995175c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TbigintToTintPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbigint_to_tint`. + * + * Per-event tbigint_to_tint: convert single-instant tbigint to tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TbigintToTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TbigintToTintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TboolEndValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TboolEndValuePhysicalFunction.hpp new file mode 100644 index 0000000000..a2e17f0774 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TboolEndValuePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbool_end_value`. + * + * Per-event tbool_end_value. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TboolEndValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TboolEndValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TboolStartValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TboolStartValuePhysicalFunction.hpp new file mode 100644 index 0000000000..40d7f5ba6b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TboolStartValuePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbool_start_value`. + * + * Per-event tbool_start_value. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TboolStartValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TboolStartValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TboolToTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TboolToTintPhysicalFunction.hpp new file mode 100644 index 0000000000..5c4b6914fe --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TboolToTintPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tbool_to_tint`. + * + * Per-event tbool_to_tint: convert single-instant tbool to tint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TboolToTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TboolToTintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TcbufferToTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TcbufferToTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..2df42c0e3b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TcbufferToTfloatPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tcbuffer_to_tfloat`. + * + * Per-event tcbuffer_to_tfloat radius extraction. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TcbufferToTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TcbufferToTfloatPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..c6fd308589 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tcontains_tcbuffer_tcbuffer`. + * + * Per-event tcontains_tcbuffer_tcbuffer over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TcontainsTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TcontainsTcbufferTcbufferPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..fdb540f1a5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tcontains_tgeo_tgeo`. + * + * Per-event tcontains_tgeo_tgeo over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TcontainsTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + TcontainsTgeoTgeoPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..b704fbebb8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tcovers_tcbuffer_tcbuffer`. + * + * Per-event tcovers_tcbuffer_tcbuffer over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TcoversTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TcoversTcbufferTcbufferPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..44569a754c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tcovers_tgeo_tgeo`. + * + * Per-event tcovers_tgeo_tgeo over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TcoversTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + TcoversTgeoTgeoPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..e0394513b8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tcbuffer_tcbuffer`. + * + * Per-event tdistance_tcbuffer_tcbuffer over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTcbufferTcbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTcbufferTcbufferPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..e2cfbfb89f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tfloat_float`. + * + * Per-event tdistance_tfloat_float: temporal distance between tfloat and scalar float. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTfloatFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.hpp new file mode 100644 index 0000000000..31c4b07b13 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tgeo_tgeo`. + * + * Per-event tdistance_tgeo_tgeo over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTgeoTgeoPhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTgeoTgeoPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTintIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTintIntPhysicalFunction.hpp new file mode 100644 index 0000000000..2fb6376948 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTintIntPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tint_int`. + * + * Per-event tdistance_tint_int: temporal distance between tint and scalar int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTintIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.hpp new file mode 100644 index 0000000000..0770186946 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tnpoint_tnpoint`. + * + * Per-event tdistance_tnpoint_tnpoint over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTnpointTnpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTnpointTnpointPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.hpp new file mode 100644 index 0000000000..2d96c815cf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tnumber_tnumber`. + * + * Per-event tdistance_tnumber_tnumber: temporal distance between two tnumbers (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTnumberTnumberPhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TdistanceTposeTposePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TdistanceTposeTposePhysicalFunction.hpp new file mode 100644 index 0000000000..fc75d692aa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TdistanceTposeTposePhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tdistance_tpose_tpose`. + * + * Per-event tdistance_tpose_tpose over hex-WKB pair. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TdistanceTposeTposePhysicalFunction : public PhysicalFunctionConcept { +public: + TdistanceTposeTposePhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..870e003c78 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_geo`. + * + * Per-event acontains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..6363abde86 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tcbuffer_cbuffer`. + * + * Per-event acontains_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..eb6804c35d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tcbuffer_geo`. + * + * Per-event acontains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..755a49623e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_tgeo`. + * + * Per-event acontains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..2ff6051e29 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_geo`. + * + * Per-event acontains_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..a8d287806d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_tgeo`. + * + * Per-event acontains_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..c8edd1e4d1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_geo`. + * + * Per-event acontains_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..e16dee73c9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acontains_tgeo_tgeo`. + * + * Per-event acontains_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAContainsTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAContainsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..e71347b507 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acovers_tcbuffer_cbuffer`. + * + * Per-event acovers_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalACoversTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalACoversTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..1926556e6b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `acovers_tcbuffer_geo`. + * + * Per-event acovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalACoversTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalACoversTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..2bf2688c7e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_geo`. + * + * Per-event adwithin_tgeo_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..b116e3cc7d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tcbuffer_cbuffer`. + * + * Per-event adwithin_tcbuffer_cbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..d25e1b9449 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tcbuffer_geo`. + * + * Per-event adwithin_tcbuffer_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTCbufferGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTCbufferGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..51c5210e04 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tcbuffer_tcbuffer`. + * + * Per-event adwithin_tcbuffer_tcbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..21c89c4b08 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_tgeo`. + * + * Per-event adwithin_tgeo_tgeo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..486ed1078f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_geo`. + * + * Per-event adwithin_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..32b67f4eb5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_tgeo`. + * + * Per-event adwithin_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..1c521aedf3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_geo`. + * + * Per-event adwithin_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..b118e16bbf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adwithin_tgeo_tgeo`. + * + * Per-event adwithin_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADWithinTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADWithinTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..e54347cf0e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_geo`. + * + * Per-event adisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..0c7c6b47ed --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tcbuffer_cbuffer`. + * + * Per-event adisjoint_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..9695d518c5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tcbuffer_geo`. + * + * Per-event adisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..ca42f94908 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tcbuffer_tcbuffer`. + * + * Per-event adisjoint_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..111026e0ca --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_tgeo`. + * + * Per-event adisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..8937f85243 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_geo`. + * + * Per-event adisjoint_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..3639ba077e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_tgeo`. + * + * Per-event adisjoint_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..2c97639547 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_geo`. + * + * Per-event adisjoint_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..397d1b8b31 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `adisjoint_tgeo_tgeo`. + * + * Per-event adisjoint_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalADisjointTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalADisjointTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.hpp index 6572ae3ecb..51cbd2a795 100644 --- a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.hpp +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.hpp @@ -1,29 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once #include #include #include +#include namespace NES { +/** + * @brief Physical operator for `aintersects_tgeo_geo`. + * + * Per-event aintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ class TemporalAIntersectsGeometryPhysicalFunction : public PhysicalFunctionConcept { public: - /// Constructor with 4 parameters for temporal-static intersection: lon1, lat1, timestamp1, static_geometry_wkt - TemporalAIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction staticGeometryFunction); - - /// Constructor with 6 parameters for temporal-temporal intersection: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - TemporalAIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction lon2Function, PhysicalFunction lat2Function, PhysicalFunction timestamp2Function); + TemporalAIntersectsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); - /// Execute the function with the given record and arena VarVal execute(const Record& record, ArenaRef& arena) const override; private: - std::vector parameterFunctions; // Stores 4 or 6 parameter functions - bool isTemporal6Param; // true for 6-param temporal-temporal, false for 4-param temporal-static - - // Helper methods for different parameter cases - VarVal executeTemporal6Param(const std::vector& params) const; - VarVal executeTemporal4Param(const std::vector& params) const; + std::vector parameterFunctions; }; -} \ No newline at end of file +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..1fb9326e27 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tcbuffer_cbuffer`. + * + * Per-event aintersects_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..0e34e4334c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tcbuffer_geo`. + * + * Per-event aintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..3fd5ab02b2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tcbuffer_tcbuffer`. + * + * Per-event aintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..79797af903 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_tgeo`. + * + * Per-event aintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..61f203a23f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_geo`. + * + * Per-event aintersects_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..2ca428a88f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_tgeo`. + * + * Per-event aintersects_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..463c554640 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_geo`. + * + * Per-event aintersects_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..5203ce323c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `aintersects_tgeo_tgeo`. + * + * Per-event aintersects_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAIntersectsTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAIntersectsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..36c273ad89 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_geo`. + * + * Per-event atouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..dfddd1649c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tcbuffer_cbuffer`. + * + * Per-event atouches_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..ad2a4edb31 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tcbuffer_geo`. + * + * Per-event atouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..3b9e6caab8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tcbuffer_tcbuffer`. + * + * Per-event atouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..6e9a1e00ae --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_tgeo`. + * + * Per-event atouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..cc0a615df0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_geo`. + * + * Per-event atouches_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..c351cd35e4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_tgeo`. + * + * Per-event atouches_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..38b9d5f857 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_geo`. + * + * Per-event atouches_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..cb36801463 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `atouches_tgeo_tgeo`. + * + * Per-event atouches_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalATouchesTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalATouchesTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAtGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAtGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..ba63e8efec --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalAtGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tgeo_at_geom`. + * + * Per-event tgeo_at_geom restriction predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalAtGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalAtGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalAtStBoxPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalAtStBoxPhysicalFunction.hpp index dbbf76fc47..f62d35f340 100644 --- a/nes-physical-operators/include/Functions/Meos/TemporalAtStBoxPhysicalFunction.hpp +++ b/nes-physical-operators/include/Functions/Meos/TemporalAtStBoxPhysicalFunction.hpp @@ -1,29 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once #include #include #include +#include namespace NES { +/** + * @brief Physical operator for `tgeo_at_stbox`. + * + * Per-event tgeo_at_stbox restriction predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ class TemporalAtStBoxPhysicalFunction : public PhysicalFunctionConcept { public: TemporalAtStBoxPhysicalFunction(PhysicalFunction lonFunction, - PhysicalFunction latFunction, - PhysicalFunction timestampFunction, - PhysicalFunction stboxFunction); - - TemporalAtStBoxPhysicalFunction(PhysicalFunction lonFunction, - PhysicalFunction latFunction, - PhysicalFunction timestampFunction, - PhysicalFunction stboxFunction, - PhysicalFunction borderInclusiveFunction); + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); VarVal execute(const Record& record, ArenaRef& arena) const override; private: std::vector parameterFunctions; - bool hasBorderParam; }; -} +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalCmpPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalCmpPhysicalFunction.hpp new file mode 100644 index 0000000000..89dbda74f6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalCmpPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_cmp`. + * + * Per-event temporal_cmp. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalCmpPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalCmpPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.hpp new file mode 100644 index 0000000000..4aed6530f9 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_dyntimewarp_distance`. + * + * Per-event temporal_dyntimewarp_distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalDyntimewarpDistancePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalDyntimewarpDistancePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.hpp index 5ff12f23fb..a534bc6c29 100644 --- a/nes-physical-operators/include/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.hpp +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.hpp @@ -1,34 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once + #include +#include +#include #include namespace NES { +/** + * @brief Physical operator for `econtains_tgeo_geo`. + * + * Per-event econtains_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ class TemporalEContainsGeometryPhysicalFunction : public PhysicalFunctionConcept { public: - /* temporal–static (tgeo,geo) or static–temporal (geo,tgeo) */ - /* Order determined by data types of the parameters */ - TemporalEContainsGeometryPhysicalFunction(PhysicalFunction param1, - PhysicalFunction param2, - PhysicalFunction param3, - PhysicalFunction param4); - - /* temporal–temporal (tgeo,tgeo) */ - TemporalEContainsGeometryPhysicalFunction(PhysicalFunction lon1, - PhysicalFunction lat1, - PhysicalFunction ts1, - PhysicalFunction lon2, - PhysicalFunction lat2, - PhysicalFunction ts2); - - VarVal execute(const Record&, ArenaRef&) const override; + TemporalEContainsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); -private: - std::vector paramFns; + VarVal execute(const Record& record, ArenaRef& arena) const override; - VarVal execTemporalStatic (const std::vector&) const; - VarVal execStaticTemporal (const std::vector&) const; - VarVal execTemporalTemporal(const std::vector&) const; +private: + std::vector parameterFunctions; }; } // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..4b12b3aaa0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tcbuffer_cbuffer`. + * + * Per-event econtains_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..9fedccdaa7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tcbuffer_geo`. + * + * Per-event econtains_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..a9a037e0c3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_tgeo`. + * + * Per-event econtains_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..600062e668 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_geo`. + * + * Per-event econtains_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..815cd14a84 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_tgeo`. + * + * Per-event econtains_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..a1d26498d8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_geo`. + * + * Per-event econtains_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..4274d1dd87 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `econtains_tgeo_tgeo`. + * + * Per-event econtains_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEContainsTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEContainsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..e713f955d0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_geo`. + * + * Per-event ecovers_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..1a56d4e1ed --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tcbuffer_cbuffer`. + * + * Per-event ecovers_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..2525d1de64 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tcbuffer_geo`. + * + * Per-event ecovers_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..98ad413db3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tcbuffer_tcbuffer`. + * + * Per-event ecovers_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..60db3a2ca5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_tgeo`. + * + * Per-event ecovers_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..34d85c6280 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_geo`. + * + * Per-event ecovers_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..c68773b938 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_tgeo`. + * + * Per-event ecovers_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..20f2a613e6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_geo`. + * + * Per-event ecovers_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..62f15eba19 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ecovers_tgeo_tgeo`. + * + * Per-event ecovers_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalECoversTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalECoversTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.hpp index b9ca6c1605..4e8d23d61e 100644 --- a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.hpp +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.hpp @@ -1,18 +1,40 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #pragma once #include #include #include +#include namespace NES { +/** + * @brief Physical operator for `edwithin_tgeo_geo`. + * + * Per-event edwithin_tgeo_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ class TemporalEDWithinGeometryPhysicalFunction : public PhysicalFunctionConcept { public: TemporalEDWithinGeometryPhysicalFunction(PhysicalFunction lonFunction, - PhysicalFunction latFunction, - PhysicalFunction timestampFunction, - PhysicalFunction geometryFunction, - PhysicalFunction distanceFunction); + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); VarVal execute(const Record& record, ArenaRef& arena) const override; @@ -20,4 +42,4 @@ class TemporalEDWithinGeometryPhysicalFunction : public PhysicalFunctionConcept std::vector parameterFunctions; }; -} +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..bb0c7023aa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tcbuffer_cbuffer`. + * + * Per-event edwithin_tcbuffer_cbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..c5c1f56631 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tcbuffer_geo`. + * + * Per-event edwithin_tcbuffer_geo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTCbufferGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTCbufferGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..276daad0d0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tcbuffer_tcbuffer`. + * + * Per-event edwithin_tcbuffer_tcbuffer dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..96ce2eff72 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_tgeo`. + * + * Per-event edwithin_tgeo_tgeo dwithin predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..e2d602be2b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_geo`. + * + * Per-event edwithin_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..b79225a078 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,47 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_tgeo`. + * + * Per-event edwithin_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..81444a6e73 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_geo`. + * + * Per-event edwithin_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..c21a827e24 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,49 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edwithin_tgeo_tgeo`. + * + * Per-event edwithin_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDWithinTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDWithinTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..7c2b39f5e0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_geo`. + * + * Per-event edisjoint_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..808c156cd4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tcbuffer_cbuffer`. + * + * Per-event edisjoint_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..49ff27bdd4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tcbuffer_geo`. + * + * Per-event edisjoint_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..47cc2decfd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_tgeo`. + * + * Per-event edisjoint_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..1a21bf05f8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_geo`. + * + * Per-event edisjoint_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..d7070955fa --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_tgeo`. + * + * Per-event edisjoint_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..d237becd3e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_geo`. + * + * Per-event edisjoint_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..ce08281e25 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `edisjoint_tgeo_tgeo`. + * + * Per-event edisjoint_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEDisjointTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEDisjointTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..f95830f799 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_geo`. + * + * Per-event eintersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..38419851f4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tcbuffer_cbuffer`. + * + * Per-event eintersects_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..0171b5a7a7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tcbuffer_geo`. + * + * Per-event eintersects_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..7b83d50683 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tcbuffer_tcbuffer`. + * + * Per-event eintersects_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..77f2110195 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_tgeo`. + * + * Per-event eintersects_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..ec6ebf93c8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_geo`. + * + * Per-event eintersects_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..afca7c962e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_tgeo`. + * + * Per-event eintersects_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..06ddd69125 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_geo`. + * + * Per-event eintersects_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..ac09b4a5db --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `eintersects_tgeo_tgeo`. + * + * Per-event eintersects_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEIntersectsTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEIntersectsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..822c5b153d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_geo`. + * + * Per-event etouches_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..5abcac2684 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tcbuffer_cbuffer`. + * + * Per-event etouches_tcbuffer_cbuffer. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..78d38283de --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tcbuffer_geo`. + * + * Per-event etouches_tcbuffer_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..06cf17b36b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tcbuffer_tcbuffer`. + * + * Per-event etouches_tcbuffer_tcbuffer spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..19ca9b693b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_tgeo`. + * + * Per-event etouches_tgeo_tgeo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..d6b2e25621 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_geo`. + * + * Per-event etouches_tgeo_geo via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..4a316f5e0e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_tgeo`. + * + * Per-event etouches_tgeo_tgeo via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..91ad757b95 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_geo`. + * + * Per-event etouches_tgeo_geo via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..2d44649a19 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `etouches_tgeo_tgeo`. + * + * Per-event etouches_tgeo_tgeo via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalETouchesTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalETouchesTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalEqPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalEqPhysicalFunction.hpp new file mode 100644 index 0000000000..16295dab91 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalEqPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_eq`. + * + * Per-event temporal_eq. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalEqPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalEqPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalFrechetDistancePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalFrechetDistancePhysicalFunction.hpp new file mode 100644 index 0000000000..6e42832c52 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalFrechetDistancePhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_frechet_distance`. + * + * Per-event temporal_frechet_distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalFrechetDistancePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalFrechetDistancePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalGePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalGePhysicalFunction.hpp new file mode 100644 index 0000000000..db23bef456 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalGePhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_ge`. + * + * Per-event temporal_ge. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalGePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalGePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalGtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalGtPhysicalFunction.hpp new file mode 100644 index 0000000000..8e75bd566a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalGtPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_gt`. + * + * Per-event temporal_gt. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalGtPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalGtPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.hpp new file mode 100644 index 0000000000..9103f07126 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_hausdorff_distance`. + * + * Per-event temporal_hausdorff_distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalHausdorffDistancePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalHausdorffDistancePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.hpp index dfe98b0df0..1add8dd4f4 100644 --- a/nes-physical-operators/include/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.hpp +++ b/nes-physical-operators/include/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.hpp @@ -1,30 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ #pragma once #include #include #include +#include namespace NES { +/** + * @brief Physical operator for `intersects_tgeo_geo`. + * + * Per-event intersects_tgeo_geo spatial predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ class TemporalIntersectsGeometryPhysicalFunction : public PhysicalFunctionConcept { public: - /// Constructor with 4 parameters for temporal-static intersection: lon1, lat1, timestamp1, static_geometry_wkt - TemporalIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction staticGeometryFunction); - - /// Constructor with 6 parameters for temporal-temporal intersection: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - TemporalIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction lon2Function, PhysicalFunction lat2Function, PhysicalFunction timestamp2Function); + TemporalIntersectsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); - /// Execute the function with the given record and arena VarVal execute(const Record& record, ArenaRef& arena) const override; private: - std::vector parameterFunctions; // Stores 4 or 6 parameter functions - bool isTemporal6Param; // true for 6-param temporal-temporal, false for 4-param temporal-static - - // Helper methods for different parameter cases - VarVal executeTemporal6Param(const std::vector& params) const; - VarVal executeTemporal4Param(const std::vector& params) const; + std::vector parameterFunctions; }; -} \ No newline at end of file +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalLePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalLePhysicalFunction.hpp new file mode 100644 index 0000000000..de2ffbe76c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalLePhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_le`. + * + * Per-event temporal_le. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalLePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalLePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalLtPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalLtPhysicalFunction.hpp new file mode 100644 index 0000000000..f2973b8ace --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalLtPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_lt`. + * + * Per-event temporal_lt. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalLtPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalLtPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalMinusGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalMinusGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..de55719ccd --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalMinusGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tgeo_minus_geom`. + * + * Per-event tgeo_minus_geom restriction predicate. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalMinusGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalMinusGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.hpp new file mode 100644 index 0000000000..214d2a27dc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tfloat_float`. + * + * Per-event nad_tfloat_float distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADFloatScalarPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADFloatScalarPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..61cd001183 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_geo`. + * + * Per-event nad_tgeo_geo nearest-approach distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADIntScalarPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADIntScalarPhysicalFunction.hpp new file mode 100644 index 0000000000..bd9bfbfa4a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADIntScalarPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tint_int`. + * + * Per-event nad_tint_int distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADIntScalarPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADIntScalarPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..bbcfe4f251 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tcbuffer_cbuffer`. + * + * Per-event nad_tcbuffer_cbuffer distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTCbufferCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..c84094cba7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tcbuffer_geo`. + * + * Per-event nad_tcbuffer_geo distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.hpp new file mode 100644 index 0000000000..fb88adf3d8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tcbuffer_tcbuffer`. + * + * Per-event nad_tcbuffer_tcbuffer distance. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTCbufferTCbufferPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTFloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTFloatPhysicalFunction.hpp new file mode 100644 index 0000000000..7b49f5e8ed --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTFloatPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tfloat_tfloat`. + * + * Per-event nad_tfloat_tfloat distance between two tfloat instants. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTFloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTFloatPhysicalFunction(PhysicalFunction valueAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction valueBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..923abb5ca1 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTGeometryPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_tgeo`. + * + * Per-event nad_tgeo_tgeo. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTIntPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTIntPhysicalFunction.hpp new file mode 100644 index 0000000000..b1579a9e08 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTIntPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tint_tint`. + * + * Per-event nad_tint_tint distance between two tint instants. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTIntPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTIntPhysicalFunction(PhysicalFunction valueAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction valueBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..3a5d20562b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_geo`. + * + * Per-event nad_tgeo_geo (nearest approach distance) via tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTNpointGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.hpp new file mode 100644 index 0000000000..ff302241e2 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_tgeo`. + * + * Per-event nad_tgeo_tgeo (nearest approach distance) via tnpoint×tnpoint→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTNpointTNpointPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.hpp new file mode 100644 index 0000000000..557e9176b8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.hpp @@ -0,0 +1,45 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_geo`. + * + * Per-event nad_tgeo_geo (nearest approach distance) via tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTPoseGeometryPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.hpp new file mode 100644 index 0000000000..723fa7db9d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.hpp @@ -0,0 +1,48 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `nad_tgeo_tgeo`. + * + * Per-event nad_tgeo_tgeo (nearest approach distance) via tpose×tpose→tgeompoint composition. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNADTPoseTPosePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNADTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalNePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalNePhysicalFunction.hpp new file mode 100644 index 0000000000..830e4ea310 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalNePhysicalFunction.hpp @@ -0,0 +1,46 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_ne`. + * + * Per-event temporal_ne. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalNePhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalNePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TemporalRoundPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TemporalRoundPhysicalFunction.hpp new file mode 100644 index 0000000000..188e135545 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TemporalRoundPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `temporal_round`. + * + * Per-event temporal_round: round single-instant tfloat to given decimal places. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TemporalRoundPhysicalFunction : public PhysicalFunctionConcept { +public: + TemporalRoundPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TeqBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..7e9cabbf60 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `teq_bool_tbool`. + * + * Per-event teq_bool_tbool: temporal equality of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TeqTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TeqTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..4351233ca0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TeqTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `teq_tbool_bool`. + * + * Per-event teq_tbool_bool: temporal equality of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TeqTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + TeqTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TextInitcapPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TextInitcapPhysicalFunction.hpp new file mode 100644 index 0000000000..2209fc7f2e --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TextInitcapPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `text_initcap`. + * + * Text initcapcase + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TextInitcapPhysicalFunction : public PhysicalFunctionConcept { +public: + TextInitcapPhysicalFunction(PhysicalFunction strFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TextLowerPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TextLowerPhysicalFunction.hpp new file mode 100644 index 0000000000..ef3be13d96 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TextLowerPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `text_lower`. + * + * Text lowercase + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TextLowerPhysicalFunction : public PhysicalFunctionConcept { +public: + TextLowerPhysicalFunction(PhysicalFunction strFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TextUpperPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TextUpperPhysicalFunction.hpp new file mode 100644 index 0000000000..30df49cef3 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TextUpperPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `text_upper`. + * + * Text uppercase + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TextUpperPhysicalFunction : public PhysicalFunctionConcept { +public: + TextUpperPhysicalFunction(PhysicalFunction strFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TextcatTextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TextcatTextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..e0bd1eea7a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TextcatTextTtextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `textcat_text_ttext(txt0, temp)`. + * + * Concatenate text and ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TextcatTextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TextcatTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TextcatTtextTextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TextcatTtextTextPhysicalFunction.hpp new file mode 100644 index 0000000000..9548764528 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TextcatTtextTextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `textcat_ttext_text(temp, txt0)`. + * + * Concatenate ttext and text + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TextcatTtextTextPhysicalFunction : public PhysicalFunctionConcept { +public: + TextcatTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TextcatTtextTtextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TextcatTtextTtextPhysicalFunction.hpp new file mode 100644 index 0000000000..f7d8df3ae0 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TextcatTtextTtextPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `textcat_ttext_ttext(temp, inst0)`. + * + * Concatenate ttext and ttext + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TextcatTtextTtextPhysicalFunction : public PhysicalFunctionConcept { +public: + TextcatTtextTtextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction tval0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatCeilPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatCeilPhysicalFunction.hpp new file mode 100644 index 0000000000..984628086f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatCeilPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_ceil`. + * + * Per-event tfloat_ceil: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatCeilPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatCeilPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatExpPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatExpPhysicalFunction.hpp new file mode 100644 index 0000000000..3f4c0e84be --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatExpPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_exp`. + * + * Per-event tfloat_exp: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatExpPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatExpPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatFloorPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatFloorPhysicalFunction.hpp new file mode 100644 index 0000000000..0e557615a4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatFloorPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_floor`. + * + * Per-event tfloat_floor: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatFloorPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatFloorPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatLnPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatLnPhysicalFunction.hpp new file mode 100644 index 0000000000..e2539cd8f5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatLnPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_ln`. + * + * Per-event tfloat_ln: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatLnPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatLnPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatLog10PhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatLog10PhysicalFunction.hpp new file mode 100644 index 0000000000..47439e84e8 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatLog10PhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_log10`. + * + * Per-event tfloat_log10: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatLog10PhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatLog10PhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatRadiansPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatRadiansPhysicalFunction.hpp new file mode 100644 index 0000000000..35d25c6f0b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatRadiansPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_radians`. + * + * Per-event tfloat_radians: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatRadiansPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatRadiansPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatScaleValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatScaleValuePhysicalFunction.hpp new file mode 100644 index 0000000000..1dd2c94c52 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatScaleValuePhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_scale_value`. + * + * Per-event tfloat_scale_value: scale single-instant tfloat value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatScaleValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.hpp new file mode 100644 index 0000000000..b0ef81fddc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_shift_scale_value`. + * + * Per-event tfloat_shift_scale_value: shift then scale single-instant tfloat value. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatShiftScaleValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatShiftScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatShiftValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatShiftValuePhysicalFunction.hpp new file mode 100644 index 0000000000..dc73cf4a47 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatShiftValuePhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_shift_value`. + * + * Per-event tfloat_shift_value: shift single-instant tfloat value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatShiftValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatShiftValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatToTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatToTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..5eefbf9c4d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatToTbigintPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_to_tbigint`. + * + * Per-event tfloat_to_tbigint: convert single-instant tfloat to tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatToTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatToTbigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TfloatToTintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TfloatToTintPhysicalFunction.hpp new file mode 100644 index 0000000000..eeab6a4123 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TfloatToTintPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tfloat_to_tint`. + * + * Per-event tfloat_to_tint: single-instant tfloat transform, value extracted -> int. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TfloatToTintPhysicalFunction : public PhysicalFunctionConcept { +public: + TfloatToTintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.hpp new file mode 100644 index 0000000000..1608768e0a --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_are_neighbor_cells(temp, inst0)`. + * + * Th3index are neighbor cells + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexAreNeighborCellsPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexAreNeighborCellsPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction cell0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.hpp new file mode 100644 index 0000000000..b5e2b007b6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_cell_to_center_child_next(temp, (int32_t)arg0)`. + * + * Th3index th3index cell to center child next + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexCellToCenterChildNextPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexCellToCenterChildNextPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.hpp new file mode 100644 index 0000000000..97e59a7895 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_cell_to_center_child(temp, (int32_t)arg0)`. + * + * Th3index th3index cell to center child + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexCellToCenterChildPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexCellToCenterChildPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.hpp new file mode 100644 index 0000000000..4ddafec5ff --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_cell_to_child_pos(temp, (int32_t)arg0)`. + * + * Th3index cell to child position + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexCellToChildPosPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexCellToChildPosPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.hpp new file mode 100644 index 0000000000..9e82809c0d --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_cell_to_parent_next(temp, (int32_t)arg0)`. + * + * Th3index th3index cell to parent next + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexCellToParentNextPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexCellToParentNextPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexCellToParentPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexCellToParentPhysicalFunction.hpp new file mode 100644 index 0000000000..96975fe098 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexCellToParentPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_cell_to_parent(temp, (int32_t)arg0)`. + * + * Th3index th3index cell to parent + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexCellToParentPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexCellToParentPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.hpp new file mode 100644 index 0000000000..eae61af055 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_get_base_cell_number(temp)`. + * + * Th3index th3index get base cell number + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexGetBaseCellNumberPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexGetBaseCellNumberPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexGetResolutionPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexGetResolutionPhysicalFunction.hpp new file mode 100644 index 0000000000..a12af49522 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexGetResolutionPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_get_resolution(temp)`. + * + * Th3index th3index get resolution + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexGetResolutionPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexGetResolutionPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexGridDistancePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexGridDistancePhysicalFunction.hpp new file mode 100644 index 0000000000..b4879ae8fc --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexGridDistancePhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_grid_distance(temp, inst0)`. + * + * Th3index grid distance + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexGridDistancePhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexGridDistancePhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction cell0Function, + PhysicalFunction ts0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexIsPentagonPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexIsPentagonPhysicalFunction.hpp new file mode 100644 index 0000000000..1cb9ab0dad --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexIsPentagonPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_is_pentagon(temp)`. + * + * Th3index th3index is pentagon + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexIsPentagonPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexIsPentagonPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/Th3indexIsValidCellPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/Th3indexIsValidCellPhysicalFunction.hpp new file mode 100644 index 0000000000..35f5c86113 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/Th3indexIsValidCellPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `th3index_is_valid_cell(temp)`. + * + * Th3index th3index is valid cell + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class Th3indexIsValidCellPhysicalFunction : public PhysicalFunctionConcept { +public: + Th3indexIsValidCellPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TintScaleValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TintScaleValuePhysicalFunction.hpp new file mode 100644 index 0000000000..baba737172 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TintScaleValuePhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tint_scale_value`. + * + * Per-event tint_scale_value: scale single-instant tint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TintScaleValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TintScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TintShiftScaleValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TintShiftScaleValuePhysicalFunction.hpp new file mode 100644 index 0000000000..be9ff076b4 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TintShiftScaleValuePhysicalFunction.hpp @@ -0,0 +1,44 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tint_shift_scale_value`. + * + * Per-event tint_shift_scale_value: shift then scale single-instant tint value. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TintShiftScaleValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TintShiftScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TintShiftValuePhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TintShiftValuePhysicalFunction.hpp new file mode 100644 index 0000000000..e1b40c61ba --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TintShiftValuePhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tint_shift_value`. + * + * Per-event tint_shift_value: shift single-instant tint value by scalar. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TintShiftValuePhysicalFunction : public PhysicalFunctionConcept { +public: + TintShiftValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TintToTbigintPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TintToTbigintPhysicalFunction.hpp new file mode 100644 index 0000000000..027dea7c91 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TintToTbigintPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tint_to_tbigint`. + * + * Per-event tint_to_tbigint: convert single-instant tint to tbigint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TintToTbigintPhysicalFunction : public PhysicalFunctionConcept { +public: + TintToTbigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TintToTfloatPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TintToTfloatPhysicalFunction.hpp new file mode 100644 index 0000000000..4a3ebf9536 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TintToTfloatPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tint_to_tfloat`. + * + * Per-event tint_to_tfloat: single-instant tfloat transform, value extracted -> double. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TintToTfloatPhysicalFunction : public PhysicalFunctionConcept { +public: + TintToTfloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TneBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..3026f9f452 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tne_bool_tbool`. + * + * Per-event tne_bool_tbool: temporal inequality of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TneBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TneTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TneTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..28c5b1fe75 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TneTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tne_tbool_bool`. + * + * Per-event tne_tbool_bool: temporal inequality of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TneTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + TneTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TnotTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TnotTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..96d62532c5 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TnotTboolPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tnot_tbool`. + * + * Per-event tnot_tbool: logical NOT of single-instant tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TnotTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TnotTboolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TnpointLengthPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TnpointLengthPhysicalFunction.hpp new file mode 100644 index 0000000000..eb6314084f --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TnpointLengthPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tnpoint_length`. + * + * Per-event tnpoint_length. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TnpointLengthPhysicalFunction : public PhysicalFunctionConcept { +public: + TnpointLengthPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TorBoolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TorBoolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..8de3b29c8c --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TorBoolTboolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tor_bool_tbool`. + * + * Per-event tor_bool_tbool: temporal OR of scalar bool and tbool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TorBoolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TorBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TorTboolBoolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TorTboolBoolPhysicalFunction.hpp new file mode 100644 index 0000000000..68e6a564d7 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TorTboolBoolPhysicalFunction.hpp @@ -0,0 +1,43 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tor_tbool_bool`. + * + * Per-event tor_tbool_bool: temporal OR of tbool and scalar bool. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TorTboolBoolPhysicalFunction : public PhysicalFunctionConcept { +public: + TorTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TorTboolTboolPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TorTboolTboolPhysicalFunction.hpp new file mode 100644 index 0000000000..f22c754ced --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TorTboolTboolPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tor_tbool_tbool`. + * + * Per-event tor_tbool_tbool: temporal OR of two tbool values (WKB result). + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TorTboolTboolPhysicalFunction : public PhysicalFunctionConcept { +public: + TorTboolTboolPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TpointLengthWkbPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TpointLengthWkbPhysicalFunction.hpp new file mode 100644 index 0000000000..20d84dbfc6 --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TpointLengthWkbPhysicalFunction.hpp @@ -0,0 +1,41 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `tpoint_length`. + * + * Per-event tpoint_length from a hex-WKB tgeompoint. + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TpointLengthWkbPhysicalFunction : public PhysicalFunctionConcept { +public: + TpointLengthWkbPhysicalFunction(PhysicalFunction trajFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TtextInitcapPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TtextInitcapPhysicalFunction.hpp new file mode 100644 index 0000000000..bd15bb1aaf --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TtextInitcapPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ttext_initcap`. + * + * Temporal text initcapcase + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TtextInitcapPhysicalFunction : public PhysicalFunctionConcept { +public: + TtextInitcapPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TtextLowerPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TtextLowerPhysicalFunction.hpp new file mode 100644 index 0000000000..06c740e84b --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TtextLowerPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ttext_lower`. + * + * Temporal text lowercase + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TtextLowerPhysicalFunction : public PhysicalFunctionConcept { +public: + TtextLowerPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/include/Functions/Meos/TtextUpperPhysicalFunction.hpp b/nes-physical-operators/include/Functions/Meos/TtextUpperPhysicalFunction.hpp new file mode 100644 index 0000000000..3063b6d3da --- /dev/null +++ b/nes-physical-operators/include/Functions/Meos/TtextUpperPhysicalFunction.hpp @@ -0,0 +1,42 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#pragma once + +#include +#include +#include +#include + +namespace NES { + +/** + * @brief Physical operator for `ttext_upper`. + * + * Temporal text uppercase + * + * Generated by tools/codegen/codegen_nebula.py. + */ +class TtextUpperPhysicalFunction : public PhysicalFunctionConcept { +public: + TtextUpperPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction); + + VarVal execute(const Record& record, ArenaRef& arena) const override; + +private: + std::vector parameterFunctions; +}; + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AboveStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AboveStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..ac05a881dd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AboveStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AboveStboxStboxPhysicalFunction::AboveStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AboveStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = above_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAboveStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AboveStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AboveStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AboveStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AboveStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..b899eaefca --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AboveStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AboveStboxTspatialPhysicalFunction::AboveStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AboveStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = above_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAboveStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AboveStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AboveStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AboveTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AboveTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..0eacd88d53 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AboveTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AboveTspatialStboxPhysicalFunction::AboveTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AboveTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = above_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAboveTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AboveTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AboveTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AboveTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AboveTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..de328b82a8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AboveTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AboveTspatialTspatialPhysicalFunction::AboveTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AboveTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return above_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAboveTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AboveTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AboveTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..1594a958f8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcontainsGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AcontainsGeoTrgeometryPhysicalFunction::AcontainsGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1) { + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); +} + +VarVal AcontainsGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto tgt_wkt = paramFns[0].execute(record, arena).cast(); + auto ref_wkt = paramFns[1].execute(record, arena).cast(); + auto x1 = paramFns[2].execute(record, arena).cast(); + auto y1 = paramFns[3].execute(record, arena).cast(); + auto theta1 = paramFns[4].execute(record, arena).cast(); + auto ts1 = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_wktsz, const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = acontains_geo_trgeometry(gs_tgt, (Temporal*)inst1); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x1, y1, theta1, ts1); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcontainsGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "AcontainsGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AcontainsGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..fda14b99e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcontainsTcbufferGeoPhysicalFunction::AcontainsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AcontainsTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = acontains_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcontainsTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AcontainsTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AcontainsTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..5ce23901e5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcontainsTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcontainsTcbufferTcbufferPhysicalFunction::AcontainsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AcontainsTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = acontains_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcontainsTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AcontainsTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AcontainsTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..ccb3d542ae --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcontainsTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcontainsTgeoGeoPhysicalFunction::AcontainsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AcontainsTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return acontains_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcontainsTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AcontainsTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AcontainsTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a91e91cdb6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcontainsTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcontainsTgeoTgeoPhysicalFunction::AcontainsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AcontainsTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return acontains_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcontainsTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AcontainsTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AcontainsTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..4ae52609ba --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AcoversGeoTrgeometryPhysicalFunction::AcoversGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1) { + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); +} + +VarVal AcoversGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto tgt_wkt = paramFns[0].execute(record, arena).cast(); + auto ref_wkt = paramFns[1].execute(record, arena).cast(); + auto x1 = paramFns[2].execute(record, arena).cast(); + auto y1 = paramFns[3].execute(record, arena).cast(); + auto theta1 = paramFns[4].execute(record, arena).cast(); + auto ts1 = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_wktsz, const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = acovers_geo_trgeometry(gs_tgt, (Temporal*)inst1); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x1, y1, theta1, ts1); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "AcoversGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AcoversGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..09b959a04f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcoversTcbufferGeoPhysicalFunction::AcoversTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AcoversTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = acovers_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AcoversTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AcoversTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..40900265c9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcoversTcbufferTcbufferPhysicalFunction::AcoversTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AcoversTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = acovers_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AcoversTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AcoversTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcoversTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..6e8dfb9b1e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcoversTgeoGeoPhysicalFunction::AcoversTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AcoversTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return acovers_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AcoversTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AcoversTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a98b828f6e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AcoversTgeoTgeoPhysicalFunction::AcoversTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AcoversTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return acovers_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AcoversTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AcoversTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..e30fbd9901 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AcoversTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AcoversTrgeometryGeoPhysicalFunction::AcoversTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal AcoversTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = acovers_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAcoversTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "AcoversTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AcoversTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..5007bf6648 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddBigintTbigintPhysicalFunction::AddBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AddBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = add_bigint_tbigint(static_cast(arg0), temp); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AddBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AddBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..8979d5690d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddFloatTfloatPhysicalFunction::AddFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AddFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = add_float_tfloat(arg0, temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AddFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AddFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..7a13aae9f2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddIntTintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddIntTintPhysicalFunction::AddIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AddIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t arg0, + int32_t value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = add_int_tint(arg0, temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AddIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AddIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..81f26e0213 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddTbigintBigintPhysicalFunction::AddTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AddTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = add_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AddTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AddTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..0ff08dbb3f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddTfloatFloatPhysicalFunction::AddTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AddTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = add_tfloat_float(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AddTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AddTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..236a6b53bd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddTintIntPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddTintIntPhysicalFunction::AddTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AddTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = add_tint_int(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AddTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AddTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AddTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AddTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..52e5c1a9fd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AddTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AddTnumberTnumberPhysicalFunction::AddTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AddTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = add_tnumber_tnumber(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAddTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AddTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AddTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..db39adc3cb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdisjointTcbufferGeoPhysicalFunction::AdisjointTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AdisjointTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = adisjoint_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdisjointTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AdisjointTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AdisjointTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..8ace07c0ca --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdisjointTcbufferTcbufferPhysicalFunction::AdisjointTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AdisjointTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = adisjoint_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdisjointTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AdisjointTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AdisjointTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..729442f8e6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdisjointTgeoGeoPhysicalFunction::AdisjointTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AdisjointTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return adisjoint_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdisjointTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AdisjointTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AdisjointTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..662688b0a5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdisjointTgeoTgeoPhysicalFunction::AdisjointTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AdisjointTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return adisjoint_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdisjointTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AdisjointTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AdisjointTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..342218783b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AdisjointTrgeometryGeoPhysicalFunction::AdisjointTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal AdisjointTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = adisjoint_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdisjointTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "AdisjointTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AdisjointTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..af768b2ebd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdisjointTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AdisjointTrgeometryTrgeometryPhysicalFunction::AdisjointTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) { + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal AdisjointTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref1_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena).cast(); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref1_wktsz + 1); + memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* ref2_str = (char*)malloc(ref2_wktsz + 1); + memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\0'; + GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str); + if (!gref2) return 0.0; + Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!pose2) { free(gref2); return 0.0; } + TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2); + free(gref2); free(pose2); + if (!inst2) { free(inst1); return 0.0; } + int r = adisjoint_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdisjointTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==10, + "AdisjointTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return AdisjointTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..f81f8847a7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentStboxStboxPhysicalFunction::AdjacentStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AdjacentStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = adjacent_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AdjacentStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AdjacentStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..1b02b1cd9d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentStboxTspatialPhysicalFunction::AdjacentStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AdjacentStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = adjacent_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AdjacentStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AdjacentStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..6b60028ebc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentTboxTnumberPhysicalFunction::AdjacentTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AdjacentTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = adjacent_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AdjacentTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AdjacentTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..ac664b29b9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentTemporalTemporalPhysicalFunction::AdjacentTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AdjacentTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return adjacent_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AdjacentTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AdjacentTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..9f4fc6f5c9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentTnumberTboxPhysicalFunction::AdjacentTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AdjacentTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = adjacent_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AdjacentTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AdjacentTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..bbb1676ed8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentTnumberTnumberPhysicalFunction::AdjacentTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AdjacentTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = adjacent_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AdjacentTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AdjacentTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..2d60721684 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentTspatialStboxPhysicalFunction::AdjacentTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AdjacentTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = adjacent_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AdjacentTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AdjacentTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..1f08dc12dd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdjacentTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdjacentTspatialTspatialPhysicalFunction::AdjacentTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AdjacentTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return adjacent_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdjacentTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AdjacentTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AdjacentTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..3f1516802f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdwithinTcbufferCbufferPhysicalFunction::AdwithinTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal AdwithinTcbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* cbufLitPtr, uint32_t cbufLitSize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = adwithin_tcbuffer_cbuffer(tcbuffer, cb, distValue); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AdwithinTcbufferCbufferPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AdwithinTcbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..64b9a7bc94 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdwithinTcbufferGeoPhysicalFunction::AdwithinTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal AdwithinTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = adwithin_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry(), distValue); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AdwithinTcbufferGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AdwithinTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..12ce674b14 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,132 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdwithinTcbufferTcbufferPhysicalFunction::AdwithinTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal AdwithinTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = adwithin_tcbuffer_tcbuffer(tA, tB, distValue); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "AdwithinTcbufferTcbufferPhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return AdwithinTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a357d6d396 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdwithinTgeoGeoPhysicalFunction::AdwithinTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal AdwithinTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS *_tgeo_geo with trailing distance arg + // — int fn(const Temporal*, const GSERIALIZED*, double). + return adwithin_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AdwithinTgeoGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AdwithinTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..b9ead2c73a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AdwithinTgeoTgeoPhysicalFunction::AdwithinTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal AdwithinTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo with trailing distance arg + // — int fn(const Temporal*, const Temporal*, double). + return adwithin_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "AdwithinTgeoTgeoPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return AdwithinTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..22554ef260 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AdwithinTrgeometryGeoPhysicalFunction::AdwithinTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt, PhysicalFunction dist) { + paramFns.reserve(7); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(dist)); +} + +VarVal AdwithinTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + auto dist = paramFns[6].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz, double dist) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = adwithin_trgeometry_geo((Temporal*)inst1, gs_tgt, dist); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt, dist); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==7, + "AdwithinTrgeometryGeoPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + return AdwithinTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..ec58653385 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AdwithinTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AdwithinTrgeometryTrgeometryPhysicalFunction::AdwithinTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2, PhysicalFunction dist) { + paramFns.reserve(11); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); + paramFns.push_back(std::move(dist)); +} + +VarVal AdwithinTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref1_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena).cast(); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + auto dist = paramFns[10].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2, double dist) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref1_wktsz + 1); + memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* ref2_str = (char*)malloc(ref2_wktsz + 1); + memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\0'; + GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str); + if (!gref2) return 0.0; + Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!pose2) { free(gref2); return 0.0; } + TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2); + free(gref2); free(pose2); + if (!inst2) { free(inst1); return 0.0; } + int r = adwithin_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2, dist); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2, dist); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAdwithinTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==11, + "AdwithinTrgeometryTrgeometryPhysicalFunction requires 11 children but got {}", + arguments.childFunctions.size()); + return AdwithinTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9]), + std::move(arguments.childFunctions[10])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..303cee9572 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterStboxStboxPhysicalFunction::AfterStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AfterStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = after_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AfterStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AfterStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..f4857f2325 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterStboxTspatialPhysicalFunction::AfterStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AfterStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = after_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AfterStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AfterStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..a20c628a8a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterTboxTnumberPhysicalFunction::AfterTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AfterTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = after_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AfterTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AfterTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..20e3a2ca59 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterTemporalTemporalPhysicalFunction::AfterTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AfterTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return after_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AfterTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AfterTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..b8dde90561 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterTnumberTboxPhysicalFunction::AfterTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AfterTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = after_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AfterTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AfterTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..df9c17b9e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterTnumberTnumberPhysicalFunction::AfterTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AfterTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = after_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "AfterTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return AfterTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..fdebda199b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterTspatialStboxPhysicalFunction::AfterTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AfterTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = after_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AfterTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AfterTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AfterTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AfterTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..4a10179df6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AfterTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AfterTspatialTspatialPhysicalFunction::AfterTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AfterTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return after_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAfterTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AfterTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AfterTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..0af296e0da --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AintersectsTcbufferGeoPhysicalFunction::AintersectsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AintersectsTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = aintersects_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAintersectsTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AintersectsTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AintersectsTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..c474c7337e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AintersectsTcbufferTcbufferPhysicalFunction::AintersectsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AintersectsTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = aintersects_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAintersectsTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AintersectsTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AintersectsTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..d9ed36c662 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AintersectsTgeoGeoPhysicalFunction::AintersectsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AintersectsTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return aintersects_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAintersectsTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AintersectsTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AintersectsTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..9061648dd6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AintersectsTgeoTgeoPhysicalFunction::AintersectsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AintersectsTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return aintersects_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAintersectsTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AintersectsTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AintersectsTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..986f1587b0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AintersectsTrgeometryGeoPhysicalFunction::AintersectsTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal AintersectsTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = aintersects_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAintersectsTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "AintersectsTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AintersectsTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..a40131f757 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AintersectsTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AintersectsTrgeometryTrgeometryPhysicalFunction::AintersectsTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) { + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal AintersectsTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref1_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena).cast(); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref1_wktsz + 1); + memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* ref2_str = (char*)malloc(ref2_wktsz + 1); + memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\0'; + GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str); + if (!gref2) return 0.0; + Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!pose2) { free(gref2); return 0.0; } + TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2); + free(gref2); free(pose2); + if (!inst2) { free(inst1); return 0.0; } + int r = aintersects_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAintersectsTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==10, + "AintersectsTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return AintersectsTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..8be4d59e81 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqBigintTbigintPhysicalFunction::AlwaysEqBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_eq_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..ba0f5654ae --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqBoolTboolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqBoolTboolPhysicalFunction::AlwaysEqBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_eq_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..305e6ae26d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqFloatTfloatPhysicalFunction::AlwaysEqFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_eq_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..71c5372974 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AlwaysEqGeoTrgeometryPhysicalFunction::AlwaysEqGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); +} + +VarVal AlwaysEqGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto tgt_wkt = paramFns[0].execute(record, arena); + auto ref_wkt = paramFns[1].execute(record, arena); + auto x = paramFns[2].execute(record, arena).cast(); + auto y = paramFns[3].execute(record, arena).cast(); + auto theta = paramFns[4].execute(record, arena).cast(); + auto ts = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_len, const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) return 0.0; + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) { free(gs_tgt); return 0.0; } + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_tgt); free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) { free(gs_tgt); return 0.0; } + int r = always_eq_geo_trgeometry(gs_tgt, (Temporal*)inst); + free(gs_tgt); free(inst); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x, y, theta, ts); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysEqGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AlwaysEqGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..f145b49521 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqIntTintPhysicalFunction::AlwaysEqIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_eq_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..3cc05433d2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqNpointTnpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqNpointTnpointPhysicalFunction::AlwaysEqNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqNpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid0 = parameterValues[0].cast>(); + auto frac0 = parameterValues[1].cast>(); + auto rid = parameterValues[2].cast>(); + auto frac = parameterValues[3].cast>(); + auto ts = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t rid0, + double frac0, + int64_t rid, + double frac, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = always_eq_npoint_tnpoint(np0, temp); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid0, frac0, rid, frac, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqNpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AlwaysEqNpointTnpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AlwaysEqNpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.cpp new file mode 100644 index 0000000000..4bc1bea0b1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqPoseTposePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqPoseTposePhysicalFunction::AlwaysEqPoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqPoseTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto px0 = parameterValues[0].cast>(); + auto py0 = parameterValues[1].cast>(); + auto ptheta0 = parameterValues[2].cast>(); + auto x = parameterValues[3].cast>(); + auto y = parameterValues[4].cast>(); + auto theta = parameterValues[5].cast>(); + auto ts = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double px0, + double py0, + double ptheta0, + double x, + double y, + double theta, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = always_eq_pose_tpose(pose0, temp); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + px0, py0, ptheta0, x, y, theta, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqPoseTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "AlwaysEqPoseTposePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return AlwaysEqPoseTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..3db4be6912 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTbigintBigintPhysicalFunction::AlwaysEqTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysEqTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_eq_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..698f8f2659 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTboolBoolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTboolBoolPhysicalFunction::AlwaysEqTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysEqTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_eq_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..71680e21a4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTcbufferCbufferPhysicalFunction::AlwaysEqTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal AlwaysEqTcbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = always_eq_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AlwaysEqTcbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AlwaysEqTcbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..80b6c638bc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTcbufferTcbufferPhysicalFunction::AlwaysEqTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysEqTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = always_eq_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AlwaysEqTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AlwaysEqTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..24511290cb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTemporalTemporalPhysicalFunction::AlwaysEqTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysEqTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_eq_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysEqTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysEqTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..c63e52b8cd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysEqTextTtextPhysicalFunction::AlwaysEqTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_eq_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..356d38b444 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTfloatFloatPhysicalFunction::AlwaysEqTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_eq_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..92d056835a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTgeoGeoPhysicalFunction::AlwaysEqTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AlwaysEqTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return always_eq_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AlwaysEqTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AlwaysEqTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..c5ea551f07 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTgeoTgeoPhysicalFunction::AlwaysEqTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysEqTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_eq_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysEqTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysEqTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.cpp new file mode 100644 index 0000000000..4f017c6342 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTh3indexH3indexPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTh3indexH3indexPhysicalFunction::AlwaysEqTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysEqTh3indexH3indexPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = always_eq_th3index_h3index(temp, (H3Index)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTh3indexH3indexPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTh3indexH3indexPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTh3indexH3indexPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..f7a7004e1e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTintIntPhysicalFunction::AlwaysEqTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysEqTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_eq_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..ef7f4a795d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbJsonbPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTjsonbJsonbPhysicalFunction::AlwaysEqTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysEqTjsonbJsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = always_eq_tjsonb_jsonb(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTjsonbJsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTjsonbJsonbPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTjsonbJsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..3b826a5e5e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTjsonbTjsonbPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTjsonbTjsonbPhysicalFunction::AlwaysEqTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(json0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal AlwaysEqTjsonbTjsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto json0 = parameterValues[2].cast(); + auto ts0 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* json0Ptr, uint32_t json0Size, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string json0S(json0Ptr, json0Size); + Jsonb* jb0 = jsonb_in(json0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tjsonbinst_make(jb0, (TimestampTz)ts0); + free(jb0); + if (!inst0) { free(temp); return 0.0; } + + double r = always_eq_tjsonb_tjsonb(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, json0.getContent(), json0.getContentSize(), ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTjsonbTjsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AlwaysEqTjsonbTjsonbPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AlwaysEqTjsonbTjsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..090cd36c3f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointNpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTnpointNpointPhysicalFunction::AlwaysEqTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); +} + +VarVal AlwaysEqTnpointNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = always_eq_tnpoint_npoint(temp, np0); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTnpointNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AlwaysEqTnpointNpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AlwaysEqTnpointNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..7e3265c26e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTnpointTnpointPhysicalFunction.cpp @@ -0,0 +1,120 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTnpointTnpointPhysicalFunction::AlwaysEqTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal AlwaysEqTnpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + auto ts0 = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tnpointinst_make(np0, (TimestampTz)ts0); + free(np0); + if (!inst0) { free(temp); return 0.0; } + + double r = always_eq_tnpoint_tnpoint(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTnpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysEqTnpointTnpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysEqTnpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTposePosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTposePosePhysicalFunction.cpp new file mode 100644 index 0000000000..62d19238e6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTposePosePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTposePosePhysicalFunction::AlwaysEqTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); +} + +VarVal AlwaysEqTposePosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = always_eq_tpose_pose(temp, pose0); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTposePosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "AlwaysEqTposePosePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return AlwaysEqTposePosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.cpp new file mode 100644 index 0000000000..59949b17e8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTposeTposePhysicalFunction.cpp @@ -0,0 +1,129 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTposeTposePhysicalFunction::AlwaysEqTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal AlwaysEqTposeTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + auto ts0 = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0A = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0A) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tposeinst_make(pose0A, (TimestampTz)ts0); + free(pose0A); + if (!inst0) { free(temp); return 0.0; } + + double r = always_eq_tpose_tpose(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTposeTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AlwaysEqTposeTposePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AlwaysEqTposeTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..b22fb441e2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTquadbinQuadbinPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysEqTquadbinQuadbinPhysicalFunction::AlwaysEqTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysEqTquadbinQuadbinPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = always_eq_tquadbin_quadbin(temp, (Quadbin)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTquadbinQuadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTquadbinQuadbinPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTquadbinQuadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..661afb57be --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AlwaysEqTrgeometryGeoPhysicalFunction::AlwaysEqTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal AlwaysEqTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref_wkt = paramFns[0].execute(record, arena); + auto x = paramFns[1].execute(record, arena).cast(); + auto y = paramFns[2].execute(record, arena).cast(); + auto theta = paramFns[3].execute(record, arena).cast(); + auto ts = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) return 0.0; + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) return 0.0; + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst); return 0.0; } + int r = always_eq_trgeometry_geo((Temporal*)inst, gs_tgt); + free(inst); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x, y, theta, ts, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysEqTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AlwaysEqTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..8413d1785f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,115 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AlwaysEqTrgeometryTrgeometryPhysicalFunction::AlwaysEqTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) +{ + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal AlwaysEqTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref1_wkt = paramFns[0].execute(record, arena); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* s1 = (char*)malloc(ref1_len + 1); + memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\0'; + GSERIALIZED* gs1 = geom_in(s1, -1); free(s1); + if (!gs1) return 0.0; + Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!p1) { free(gs1); return 0.0; } + TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1); + free(gs1); free(p1); + if (!inst1) return 0.0; + char* s2 = (char*)malloc(ref2_len + 1); + memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\0'; + GSERIALIZED* gs2 = geom_in(s2, -1); free(s2); + if (!gs2) { free(inst1); return 0.0; } + Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!p2) { free(inst1); free(gs2); return 0.0; } + TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2); + free(gs2); free(p2); + if (!inst2) { free(inst1); return 0.0; } + int r = always_eq_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 10, + "AlwaysEqTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return AlwaysEqTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..82b67b0ada --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysEqTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysEqTtextTextPhysicalFunction::AlwaysEqTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysEqTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_eq_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysEqTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysEqTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysEqTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..a65124a683 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeBigintTbigintPhysicalFunction::AlwaysGeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGeBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_ge_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..939c096d4c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeFloatTfloatPhysicalFunction::AlwaysGeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGeFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_ge_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..7676ed49ad --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeIntTintPhysicalFunction::AlwaysGeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGeIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_ge_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..c3f08fdae5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeTbigintBigintPhysicalFunction::AlwaysGeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysGeTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_ge_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..eaf46c5ff7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeTemporalTemporalPhysicalFunction::AlwaysGeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysGeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_ge_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysGeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysGeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..38d67145e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysGeTextTtextPhysicalFunction::AlwaysGeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_ge_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..01feb1a5b9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeTfloatFloatPhysicalFunction::AlwaysGeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGeTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_ge_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..5af14cac76 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGeTintIntPhysicalFunction::AlwaysGeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGeTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_ge_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..3e5915d58b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysGeTtextTextPhysicalFunction::AlwaysGeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysGeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_ge_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..d17001db77 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtBigintTbigintPhysicalFunction::AlwaysGtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGtBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_gt_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..67f5d528ba --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtFloatTfloatPhysicalFunction::AlwaysGtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGtFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_gt_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..9059c5126a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtIntTintPhysicalFunction::AlwaysGtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGtIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_gt_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..0d86227580 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtTbigintBigintPhysicalFunction::AlwaysGtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysGtTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_gt_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..f1fc4ba59a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtTemporalTemporalPhysicalFunction::AlwaysGtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysGtTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_gt_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysGtTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysGtTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..79d38cd3ec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysGtTextTtextPhysicalFunction::AlwaysGtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGtTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_gt_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..f4cd47b360 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtTfloatFloatPhysicalFunction::AlwaysGtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGtTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_gt_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..c7e6548620 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysGtTintIntPhysicalFunction::AlwaysGtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysGtTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_gt_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..ddcab0540a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysGtTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysGtTtextTextPhysicalFunction::AlwaysGtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysGtTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_gt_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysGtTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysGtTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysGtTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..4dffc4cd49 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeBigintTbigintPhysicalFunction::AlwaysLeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLeBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_le_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..a75f9f7869 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeFloatTfloatPhysicalFunction::AlwaysLeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLeFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_le_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..c9b139b91b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeIntTintPhysicalFunction::AlwaysLeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLeIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_le_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..9d66c6032a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeTbigintBigintPhysicalFunction::AlwaysLeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysLeTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_le_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..4aac98cac4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeTemporalTemporalPhysicalFunction::AlwaysLeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysLeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_le_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysLeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysLeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..e9fa1c910a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysLeTextTtextPhysicalFunction::AlwaysLeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_le_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..51c2e27f18 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeTfloatFloatPhysicalFunction::AlwaysLeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLeTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_le_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..a5a4a077a8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLeTintIntPhysicalFunction::AlwaysLeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLeTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_le_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..1013c3d5e2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysLeTtextTextPhysicalFunction::AlwaysLeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysLeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_le_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..1fbfe623d6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtBigintTbigintPhysicalFunction::AlwaysLtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLtBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_lt_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..b1cf8dd227 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtFloatTfloatPhysicalFunction::AlwaysLtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLtFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_lt_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..fdab5b0593 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtIntTintPhysicalFunction::AlwaysLtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLtIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_lt_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..0039773dac --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtTbigintBigintPhysicalFunction::AlwaysLtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysLtTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_lt_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..84561c46d3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtTemporalTemporalPhysicalFunction::AlwaysLtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysLtTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_lt_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysLtTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysLtTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..44c2fdfde7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysLtTextTtextPhysicalFunction::AlwaysLtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLtTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_lt_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..e63bfadc94 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtTfloatFloatPhysicalFunction::AlwaysLtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLtTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_lt_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..9c9043688b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysLtTintIntPhysicalFunction::AlwaysLtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysLtTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_lt_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..d7922ae5a5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysLtTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysLtTtextTextPhysicalFunction::AlwaysLtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysLtTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_lt_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysLtTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysLtTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysLtTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..0388366dbb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeBigintTbigintPhysicalFunction::AlwaysNeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_ne_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..84a3de0c25 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeBoolTboolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeBoolTboolPhysicalFunction::AlwaysNeBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_ne_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..88b3a2d8e5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeFloatTfloatPhysicalFunction::AlwaysNeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_ne_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..635fe64a38 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AlwaysNeGeoTrgeometryPhysicalFunction::AlwaysNeGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); +} + +VarVal AlwaysNeGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto tgt_wkt = paramFns[0].execute(record, arena); + auto ref_wkt = paramFns[1].execute(record, arena); + auto x = paramFns[2].execute(record, arena).cast(); + auto y = paramFns[3].execute(record, arena).cast(); + auto theta = paramFns[4].execute(record, arena).cast(); + auto ts = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_len, const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) return 0.0; + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) { free(gs_tgt); return 0.0; } + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_tgt); free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) { free(gs_tgt); return 0.0; } + int r = always_ne_geo_trgeometry(gs_tgt, (Temporal*)inst); + free(gs_tgt); free(inst); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x, y, theta, ts); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysNeGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AlwaysNeGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..801e7585e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeIntTintPhysicalFunction::AlwaysNeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = always_ne_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..bfc0489dea --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeNpointTnpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeNpointTnpointPhysicalFunction::AlwaysNeNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeNpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid0 = parameterValues[0].cast>(); + auto frac0 = parameterValues[1].cast>(); + auto rid = parameterValues[2].cast>(); + auto frac = parameterValues[3].cast>(); + auto ts = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t rid0, + double frac0, + int64_t rid, + double frac, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = always_ne_npoint_tnpoint(np0, temp); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid0, frac0, rid, frac, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeNpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AlwaysNeNpointTnpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AlwaysNeNpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNePoseTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNePoseTposePhysicalFunction.cpp new file mode 100644 index 0000000000..44af35e8a5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNePoseTposePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNePoseTposePhysicalFunction::AlwaysNePoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNePoseTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto px0 = parameterValues[0].cast>(); + auto py0 = parameterValues[1].cast>(); + auto ptheta0 = parameterValues[2].cast>(); + auto x = parameterValues[3].cast>(); + auto y = parameterValues[4].cast>(); + auto theta = parameterValues[5].cast>(); + auto ts = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double px0, + double py0, + double ptheta0, + double x, + double y, + double theta, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = always_ne_pose_tpose(pose0, temp); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + px0, py0, ptheta0, x, y, theta, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNePoseTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "AlwaysNePoseTposePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return AlwaysNePoseTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..30032023d1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTbigintBigintPhysicalFunction::AlwaysNeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysNeTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_ne_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..b96149f20e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTboolBoolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTboolBoolPhysicalFunction::AlwaysNeTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysNeTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = always_ne_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..f8987626f5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTcbufferCbufferPhysicalFunction::AlwaysNeTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal AlwaysNeTcbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = always_ne_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AlwaysNeTcbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AlwaysNeTcbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..951fede1ba --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTcbufferTcbufferPhysicalFunction::AlwaysNeTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysNeTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = always_ne_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AlwaysNeTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AlwaysNeTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..3a437b7d9c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTemporalTemporalPhysicalFunction::AlwaysNeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysNeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_ne_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysNeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysNeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..a53973c5d6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysNeTextTtextPhysicalFunction::AlwaysNeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_ne_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..380817554e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTfloatFloatPhysicalFunction::AlwaysNeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_ne_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..378188b2de --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTgeoGeoPhysicalFunction::AlwaysNeTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AlwaysNeTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return always_ne_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AlwaysNeTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AlwaysNeTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a219236cf7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTgeoTgeoPhysicalFunction::AlwaysNeTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AlwaysNeTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return always_ne_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysNeTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysNeTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.cpp new file mode 100644 index 0000000000..80a98ff206 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTh3indexH3indexPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTh3indexH3indexPhysicalFunction::AlwaysNeTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysNeTh3indexH3indexPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = always_ne_th3index_h3index(temp, (H3Index)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTh3indexH3indexPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTh3indexH3indexPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTh3indexH3indexPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..3b0bb62ac8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTintIntPhysicalFunction::AlwaysNeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal AlwaysNeTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = always_ne_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..f7ec0374ef --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbJsonbPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTjsonbJsonbPhysicalFunction::AlwaysNeTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysNeTjsonbJsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = always_ne_tjsonb_jsonb(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTjsonbJsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTjsonbJsonbPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTjsonbJsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..2cfb5711a6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTjsonbTjsonbPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTjsonbTjsonbPhysicalFunction::AlwaysNeTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(json0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal AlwaysNeTjsonbTjsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto json0 = parameterValues[2].cast(); + auto ts0 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* json0Ptr, uint32_t json0Size, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string json0S(json0Ptr, json0Size); + Jsonb* jb0 = jsonb_in(json0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tjsonbinst_make(jb0, (TimestampTz)ts0); + free(jb0); + if (!inst0) { free(temp); return 0.0; } + + double r = always_ne_tjsonb_tjsonb(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, json0.getContent(), json0.getContentSize(), ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTjsonbTjsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AlwaysNeTjsonbTjsonbPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AlwaysNeTjsonbTjsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..806949198a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointNpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTnpointNpointPhysicalFunction::AlwaysNeTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); +} + +VarVal AlwaysNeTnpointNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = always_ne_tnpoint_npoint(temp, np0); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTnpointNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AlwaysNeTnpointNpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AlwaysNeTnpointNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..c4eaab3ed3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTnpointTnpointPhysicalFunction.cpp @@ -0,0 +1,120 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTnpointTnpointPhysicalFunction::AlwaysNeTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal AlwaysNeTnpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + auto ts0 = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tnpointinst_make(np0, (TimestampTz)ts0); + free(np0); + if (!inst0) { free(temp); return 0.0; } + + double r = always_ne_tnpoint_tnpoint(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTnpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysNeTnpointTnpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AlwaysNeTnpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTposePosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTposePosePhysicalFunction.cpp new file mode 100644 index 0000000000..fa4693f3e3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTposePosePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTposePosePhysicalFunction::AlwaysNeTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); +} + +VarVal AlwaysNeTposePosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = always_ne_tpose_pose(temp, pose0); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTposePosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "AlwaysNeTposePosePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return AlwaysNeTposePosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.cpp new file mode 100644 index 0000000000..c695629c8f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTposeTposePhysicalFunction.cpp @@ -0,0 +1,129 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTposeTposePhysicalFunction::AlwaysNeTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal AlwaysNeTposeTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + auto ts0 = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0A = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0A) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tposeinst_make(pose0A, (TimestampTz)ts0); + free(pose0A); + if (!inst0) { free(temp); return 0.0; } + + double r = always_ne_tpose_tpose(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTposeTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AlwaysNeTposeTposePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AlwaysNeTposeTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..38b5da0b53 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTquadbinQuadbinPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AlwaysNeTquadbinQuadbinPhysicalFunction::AlwaysNeTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysNeTquadbinQuadbinPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = always_ne_tquadbin_quadbin(temp, (Quadbin)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTquadbinQuadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTquadbinQuadbinPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTquadbinQuadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..95049e29ea --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AlwaysNeTrgeometryGeoPhysicalFunction::AlwaysNeTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal AlwaysNeTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref_wkt = paramFns[0].execute(record, arena); + auto x = paramFns[1].execute(record, arena).cast(); + auto y = paramFns[2].execute(record, arena).cast(); + auto theta = paramFns[3].execute(record, arena).cast(); + auto ts = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) return 0.0; + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) return 0.0; + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst); return 0.0; } + int r = always_ne_trgeometry_geo((Temporal*)inst, gs_tgt); + free(inst); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x, y, theta, ts, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AlwaysNeTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AlwaysNeTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..5c4e5acda6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,115 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AlwaysNeTrgeometryTrgeometryPhysicalFunction::AlwaysNeTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) +{ + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal AlwaysNeTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref1_wkt = paramFns[0].execute(record, arena); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* s1 = (char*)malloc(ref1_len + 1); + memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\0'; + GSERIALIZED* gs1 = geom_in(s1, -1); free(s1); + if (!gs1) return 0.0; + Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!p1) { free(gs1); return 0.0; } + TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1); + free(gs1); free(p1); + if (!inst1) return 0.0; + char* s2 = (char*)malloc(ref2_len + 1); + memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\0'; + GSERIALIZED* gs2 = geom_in(s2, -1); free(s2); + if (!gs2) { free(inst1); return 0.0; } + Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!p2) { free(inst1); free(gs2); return 0.0; } + TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2); + free(gs2); free(p2); + if (!inst2) { free(inst1); return 0.0; } + int r = always_ne_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 10, + "AlwaysNeTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return AlwaysNeTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..8f6964a1de --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AlwaysNeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +AlwaysNeTtextTextPhysicalFunction::AlwaysNeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal AlwaysNeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = always_ne_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAlwaysNeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "AlwaysNeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return AlwaysNeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..bdd1f29212 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AtouchesTcbufferGeoPhysicalFunction::AtouchesTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AtouchesTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = atouches_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAtouchesTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "AtouchesTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return AtouchesTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..3d0175fde0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AtouchesTcbufferTcbufferPhysicalFunction::AtouchesTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AtouchesTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = atouches_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAtouchesTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "AtouchesTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return AtouchesTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..2a4946976b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AtouchesTgeoGeoPhysicalFunction::AtouchesTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AtouchesTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return atouches_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAtouchesTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AtouchesTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AtouchesTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..b759c9e014 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AtouchesTgeoTgeoPhysicalFunction::AtouchesTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal AtouchesTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return atouches_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAtouchesTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "AtouchesTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return AtouchesTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AtouchesTpointGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTpointGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..2b77956035 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTpointGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +AtouchesTpointGeoPhysicalFunction::AtouchesTpointGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal AtouchesTpointGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return atouches_tpoint_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAtouchesTpointGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "AtouchesTpointGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return AtouchesTpointGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..9ece028436 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/AtouchesTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +AtouchesTrgeometryGeoPhysicalFunction::AtouchesTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal AtouchesTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = atouches_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterAtouchesTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "AtouchesTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return AtouchesTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BackStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BackStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..e2d640928b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BackStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BackStboxStboxPhysicalFunction::BackStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BackStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = back_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBackStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "BackStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return BackStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BackStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BackStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..b3d8716793 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BackStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BackStboxTspatialPhysicalFunction::BackStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BackStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = back_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBackStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "BackStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return BackStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BackTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BackTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..5f12e7f9a0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BackTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BackTspatialStboxPhysicalFunction::BackTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BackTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = back_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBackTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "BackTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return BackTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BackTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BackTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..287e22ca76 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BackTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BackTspatialTspatialPhysicalFunction::BackTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal BackTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return back_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBackTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "BackTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return BackTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..84b7237748 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeStboxStboxPhysicalFunction::BeforeStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BeforeStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = before_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "BeforeStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return BeforeStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..9eec3c8321 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeStboxTspatialPhysicalFunction::BeforeStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BeforeStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = before_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "BeforeStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return BeforeStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..f34f57d91f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeTboxTnumberPhysicalFunction::BeforeTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BeforeTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = before_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "BeforeTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return BeforeTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..9210aca4d8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeTemporalTemporalPhysicalFunction::BeforeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal BeforeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return before_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "BeforeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return BeforeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..97d1dd8f1f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeTnumberTboxPhysicalFunction::BeforeTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BeforeTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = before_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "BeforeTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return BeforeTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..caa274cc6b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeTnumberTnumberPhysicalFunction::BeforeTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BeforeTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = before_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "BeforeTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return BeforeTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..cdf0b31a31 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeTspatialStboxPhysicalFunction::BeforeTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BeforeTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = before_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "BeforeTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return BeforeTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..9bc29c9521 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BeforeTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BeforeTspatialTspatialPhysicalFunction::BeforeTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal BeforeTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return before_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBeforeTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "BeforeTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return BeforeTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BelowStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BelowStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..472b4abb3f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BelowStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BelowStboxStboxPhysicalFunction::BelowStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BelowStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = below_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBelowStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "BelowStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return BelowStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BelowStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BelowStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..e3102fddc1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BelowStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BelowStboxTspatialPhysicalFunction::BelowStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BelowStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = below_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBelowStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "BelowStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return BelowStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BelowTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BelowTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..35e584d8fb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BelowTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BelowTspatialStboxPhysicalFunction::BelowTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal BelowTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = below_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBelowTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "BelowTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return BelowTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/BelowTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/BelowTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..e92d3e2535 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/BelowTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +BelowTspatialTspatialPhysicalFunction::BelowTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal BelowTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return below_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterBelowTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "BelowTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return BelowTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/CMakeLists.txt b/nes-physical-operators/src/Functions/Meos/CMakeLists.txt index cf83ac5aad..8b4c31480e 100644 --- a/nes-physical-operators/src/Functions/Meos/CMakeLists.txt +++ b/nes-physical-operators/src/Functions/Meos/CMakeLists.txt @@ -17,4 +17,769 @@ add_plugin(TemporalAIntersectsGeometry PhysicalFunction nes-physical-operators T add_plugin(TemporalEContainsGeometry PhysicalFunction nes-physical-operators TemporalEContainsGeometryPhysicalFunction.cpp) add_plugin(TemporalEDWithinGeometry PhysicalFunction nes-physical-operators TemporalEDWithinGeometryPhysicalFunction.cpp) add_plugin(TemporalAtStBox PhysicalFunction nes-physical-operators TemporalAtStBoxPhysicalFunction.cpp) +add_plugin(TfloatCeil PhysicalFunction nes-physical-operators TfloatCeilPhysicalFunction.cpp) +add_plugin(TfloatExp PhysicalFunction nes-physical-operators TfloatExpPhysicalFunction.cpp) +add_plugin(TfloatFloor PhysicalFunction nes-physical-operators TfloatFloorPhysicalFunction.cpp) +add_plugin(TfloatLn PhysicalFunction nes-physical-operators TfloatLnPhysicalFunction.cpp) +add_plugin(TfloatLog10 PhysicalFunction nes-physical-operators TfloatLog10PhysicalFunction.cpp) +add_plugin(TfloatRadians PhysicalFunction nes-physical-operators TfloatRadiansPhysicalFunction.cpp) +add_plugin(TfloatToTint PhysicalFunction nes-physical-operators TfloatToTintPhysicalFunction.cpp) +add_plugin(TintToTfloat PhysicalFunction nes-physical-operators TintToTfloatPhysicalFunction.cpp) +add_plugin(AddTfloatFloat PhysicalFunction nes-physical-operators AddTfloatFloatPhysicalFunction.cpp) +add_plugin(SubTfloatFloat PhysicalFunction nes-physical-operators SubTfloatFloatPhysicalFunction.cpp) +add_plugin(MulTfloatFloat PhysicalFunction nes-physical-operators MulTfloatFloatPhysicalFunction.cpp) +add_plugin(DivTfloatFloat PhysicalFunction nes-physical-operators DivTfloatFloatPhysicalFunction.cpp) +add_plugin(AddTintInt PhysicalFunction nes-physical-operators AddTintIntPhysicalFunction.cpp) +add_plugin(SubTintInt PhysicalFunction nes-physical-operators SubTintIntPhysicalFunction.cpp) +add_plugin(MulTintInt PhysicalFunction nes-physical-operators MulTintIntPhysicalFunction.cpp) +add_plugin(DivTintInt PhysicalFunction nes-physical-operators DivTintIntPhysicalFunction.cpp) +add_plugin(AddFloatTfloat PhysicalFunction nes-physical-operators AddFloatTfloatPhysicalFunction.cpp) +add_plugin(SubFloatTfloat PhysicalFunction nes-physical-operators SubFloatTfloatPhysicalFunction.cpp) +add_plugin(MulFloatTfloat PhysicalFunction nes-physical-operators MulFloatTfloatPhysicalFunction.cpp) +add_plugin(DivFloatTfloat PhysicalFunction nes-physical-operators DivFloatTfloatPhysicalFunction.cpp) +add_plugin(AddIntTint PhysicalFunction nes-physical-operators AddIntTintPhysicalFunction.cpp) +add_plugin(SubIntTint PhysicalFunction nes-physical-operators SubIntTintPhysicalFunction.cpp) +add_plugin(MulIntTint PhysicalFunction nes-physical-operators MulIntTintPhysicalFunction.cpp) +add_plugin(DivIntTint PhysicalFunction nes-physical-operators DivIntTintPhysicalFunction.cpp) +add_plugin(AddTbigintBigint PhysicalFunction nes-physical-operators AddTbigintBigintPhysicalFunction.cpp) +add_plugin(SubTbigintBigint PhysicalFunction nes-physical-operators SubTbigintBigintPhysicalFunction.cpp) +add_plugin(MulTbigintBigint PhysicalFunction nes-physical-operators MulTbigintBigintPhysicalFunction.cpp) +add_plugin(DivTbigintBigint PhysicalFunction nes-physical-operators DivTbigintBigintPhysicalFunction.cpp) +add_plugin(AddBigintTbigint PhysicalFunction nes-physical-operators AddBigintTbigintPhysicalFunction.cpp) +add_plugin(SubBigintTbigint PhysicalFunction nes-physical-operators SubBigintTbigintPhysicalFunction.cpp) +add_plugin(MulBigintTbigint PhysicalFunction nes-physical-operators MulBigintTbigintPhysicalFunction.cpp) +add_plugin(DivBigintTbigint PhysicalFunction nes-physical-operators DivBigintTbigintPhysicalFunction.cpp) +add_plugin(AddTnumberTnumber PhysicalFunction nes-physical-operators AddTnumberTnumberPhysicalFunction.cpp) +add_plugin(SubTnumberTnumber PhysicalFunction nes-physical-operators SubTnumberTnumberPhysicalFunction.cpp) +add_plugin(MulTnumberTnumber PhysicalFunction nes-physical-operators MulTnumberTnumberPhysicalFunction.cpp) +add_plugin(DivTnumberTnumber PhysicalFunction nes-physical-operators DivTnumberTnumberPhysicalFunction.cpp) +add_plugin(TfloatShiftValue PhysicalFunction nes-physical-operators TfloatShiftValuePhysicalFunction.cpp) +add_plugin(TfloatScaleValue PhysicalFunction nes-physical-operators TfloatScaleValuePhysicalFunction.cpp) +add_plugin(TfloatShiftScaleValue PhysicalFunction nes-physical-operators TfloatShiftScaleValuePhysicalFunction.cpp) +add_plugin(TintShiftValue PhysicalFunction nes-physical-operators TintShiftValuePhysicalFunction.cpp) +add_plugin(TintScaleValue PhysicalFunction nes-physical-operators TintScaleValuePhysicalFunction.cpp) +add_plugin(TintShiftScaleValue PhysicalFunction nes-physical-operators TintShiftScaleValuePhysicalFunction.cpp) +add_plugin(TbigintShiftValue PhysicalFunction nes-physical-operators TbigintShiftValuePhysicalFunction.cpp) +add_plugin(TbigintScaleValue PhysicalFunction nes-physical-operators TbigintScaleValuePhysicalFunction.cpp) +add_plugin(TbigintShiftScaleValue PhysicalFunction nes-physical-operators TbigintShiftScaleValuePhysicalFunction.cpp) +add_plugin(TdistanceTfloatFloat PhysicalFunction nes-physical-operators TdistanceTfloatFloatPhysicalFunction.cpp) +add_plugin(TdistanceTintInt PhysicalFunction nes-physical-operators TdistanceTintIntPhysicalFunction.cpp) +add_plugin(TdistanceTnumberTnumber PhysicalFunction nes-physical-operators TdistanceTnumberTnumberPhysicalFunction.cpp) +add_plugin(TemporalRound PhysicalFunction nes-physical-operators TemporalRoundPhysicalFunction.cpp) +add_plugin(EverEqTbigintBigint PhysicalFunction nes-physical-operators EverEqTbigintBigintPhysicalFunction.cpp) +add_plugin(EverNeTbigintBigint PhysicalFunction nes-physical-operators EverNeTbigintBigintPhysicalFunction.cpp) +add_plugin(EverLtTbigintBigint PhysicalFunction nes-physical-operators EverLtTbigintBigintPhysicalFunction.cpp) +add_plugin(EverLeTbigintBigint PhysicalFunction nes-physical-operators EverLeTbigintBigintPhysicalFunction.cpp) +add_plugin(EverGtTbigintBigint PhysicalFunction nes-physical-operators EverGtTbigintBigintPhysicalFunction.cpp) +add_plugin(EverGeTbigintBigint PhysicalFunction nes-physical-operators EverGeTbigintBigintPhysicalFunction.cpp) +add_plugin(AlwaysEqTbigintBigint PhysicalFunction nes-physical-operators AlwaysEqTbigintBigintPhysicalFunction.cpp) +add_plugin(AlwaysNeTbigintBigint PhysicalFunction nes-physical-operators AlwaysNeTbigintBigintPhysicalFunction.cpp) +add_plugin(AlwaysLtTbigintBigint PhysicalFunction nes-physical-operators AlwaysLtTbigintBigintPhysicalFunction.cpp) +add_plugin(AlwaysLeTbigintBigint PhysicalFunction nes-physical-operators AlwaysLeTbigintBigintPhysicalFunction.cpp) +add_plugin(AlwaysGtTbigintBigint PhysicalFunction nes-physical-operators AlwaysGtTbigintBigintPhysicalFunction.cpp) +add_plugin(AlwaysGeTbigintBigint PhysicalFunction nes-physical-operators AlwaysGeTbigintBigintPhysicalFunction.cpp) +add_plugin(EverEqBigintTbigint PhysicalFunction nes-physical-operators EverEqBigintTbigintPhysicalFunction.cpp) +add_plugin(EverNeBigintTbigint PhysicalFunction nes-physical-operators EverNeBigintTbigintPhysicalFunction.cpp) +add_plugin(EverLtBigintTbigint PhysicalFunction nes-physical-operators EverLtBigintTbigintPhysicalFunction.cpp) +add_plugin(EverLeBigintTbigint PhysicalFunction nes-physical-operators EverLeBigintTbigintPhysicalFunction.cpp) +add_plugin(EverGtBigintTbigint PhysicalFunction nes-physical-operators EverGtBigintTbigintPhysicalFunction.cpp) +add_plugin(EverGeBigintTbigint PhysicalFunction nes-physical-operators EverGeBigintTbigintPhysicalFunction.cpp) +add_plugin(AlwaysEqBigintTbigint PhysicalFunction nes-physical-operators AlwaysEqBigintTbigintPhysicalFunction.cpp) +add_plugin(AlwaysNeBigintTbigint PhysicalFunction nes-physical-operators AlwaysNeBigintTbigintPhysicalFunction.cpp) +add_plugin(AlwaysLtBigintTbigint PhysicalFunction nes-physical-operators AlwaysLtBigintTbigintPhysicalFunction.cpp) +add_plugin(AlwaysLeBigintTbigint PhysicalFunction nes-physical-operators AlwaysLeBigintTbigintPhysicalFunction.cpp) +add_plugin(AlwaysGtBigintTbigint PhysicalFunction nes-physical-operators AlwaysGtBigintTbigintPhysicalFunction.cpp) +add_plugin(AlwaysGeBigintTbigint PhysicalFunction nes-physical-operators AlwaysGeBigintTbigintPhysicalFunction.cpp) +add_plugin(EverEqTboolBool PhysicalFunction nes-physical-operators EverEqTboolBoolPhysicalFunction.cpp) +add_plugin(EverNeTboolBool PhysicalFunction nes-physical-operators EverNeTboolBoolPhysicalFunction.cpp) +add_plugin(AlwaysEqTboolBool PhysicalFunction nes-physical-operators AlwaysEqTboolBoolPhysicalFunction.cpp) +add_plugin(AlwaysNeTboolBool PhysicalFunction nes-physical-operators AlwaysNeTboolBoolPhysicalFunction.cpp) +add_plugin(EverEqBoolTbool PhysicalFunction nes-physical-operators EverEqBoolTboolPhysicalFunction.cpp) +add_plugin(EverNeBoolTbool PhysicalFunction nes-physical-operators EverNeBoolTboolPhysicalFunction.cpp) +add_plugin(AlwaysEqBoolTbool PhysicalFunction nes-physical-operators AlwaysEqBoolTboolPhysicalFunction.cpp) +add_plugin(AlwaysNeBoolTbool PhysicalFunction nes-physical-operators AlwaysNeBoolTboolPhysicalFunction.cpp) +add_plugin(TbigintToTint PhysicalFunction nes-physical-operators TbigintToTintPhysicalFunction.cpp) +add_plugin(TbigintToTfloat PhysicalFunction nes-physical-operators TbigintToTfloatPhysicalFunction.cpp) +add_plugin(TintToTbigint PhysicalFunction nes-physical-operators TintToTbigintPhysicalFunction.cpp) +add_plugin(TfloatToTbigint PhysicalFunction nes-physical-operators TfloatToTbigintPhysicalFunction.cpp) +add_plugin(TboolToTint PhysicalFunction nes-physical-operators TboolToTintPhysicalFunction.cpp) +add_plugin(TnotTbool PhysicalFunction nes-physical-operators TnotTboolPhysicalFunction.cpp) +add_plugin(TandTboolBool PhysicalFunction nes-physical-operators TandTboolBoolPhysicalFunction.cpp) +add_plugin(TorTboolBool PhysicalFunction nes-physical-operators TorTboolBoolPhysicalFunction.cpp) +add_plugin(TeqTboolBool PhysicalFunction nes-physical-operators TeqTboolBoolPhysicalFunction.cpp) +add_plugin(TneTboolBool PhysicalFunction nes-physical-operators TneTboolBoolPhysicalFunction.cpp) +add_plugin(TandBoolTbool PhysicalFunction nes-physical-operators TandBoolTboolPhysicalFunction.cpp) +add_plugin(TorBoolTbool PhysicalFunction nes-physical-operators TorBoolTboolPhysicalFunction.cpp) +add_plugin(TeqBoolTbool PhysicalFunction nes-physical-operators TeqBoolTboolPhysicalFunction.cpp) +add_plugin(TneBoolTbool PhysicalFunction nes-physical-operators TneBoolTboolPhysicalFunction.cpp) +add_plugin(TandTboolTbool PhysicalFunction nes-physical-operators TandTboolTboolPhysicalFunction.cpp) +add_plugin(TorTboolTbool PhysicalFunction nes-physical-operators TorTboolTboolPhysicalFunction.cpp) +add_plugin(EcoversTgeoGeo PhysicalFunction nes-physical-operators EcoversTgeoGeoPhysicalFunction.cpp) +add_plugin(EdisjointTgeoGeo PhysicalFunction nes-physical-operators EdisjointTgeoGeoPhysicalFunction.cpp) +add_plugin(EdwithinTgeoGeo PhysicalFunction nes-physical-operators EdwithinTgeoGeoPhysicalFunction.cpp) +add_plugin(NadTgeoTgeo PhysicalFunction nes-physical-operators NadTgeoTgeoPhysicalFunction.cpp) +add_plugin(EcontainsTcbufferTcbuffer PhysicalFunction nes-physical-operators EcontainsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AcontainsTcbufferTcbuffer PhysicalFunction nes-physical-operators AcontainsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EdisjointTcbufferTcbuffer PhysicalFunction nes-physical-operators EdisjointTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EdwithinTcbufferCbuffer PhysicalFunction nes-physical-operators EdwithinTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AdwithinTcbufferCbuffer PhysicalFunction nes-physical-operators AdwithinTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AcontainsTgeoGeo PhysicalFunction nes-physical-operators AcontainsTgeoGeoPhysicalFunction.cpp) +add_plugin(AcoversTgeoGeo PhysicalFunction nes-physical-operators AcoversTgeoGeoPhysicalFunction.cpp) +add_plugin(AdisjointTgeoGeo PhysicalFunction nes-physical-operators AdisjointTgeoGeoPhysicalFunction.cpp) +add_plugin(AintersectsTgeoGeo PhysicalFunction nes-physical-operators AintersectsTgeoGeoPhysicalFunction.cpp) +add_plugin(AtouchesTgeoGeo PhysicalFunction nes-physical-operators AtouchesTgeoGeoPhysicalFunction.cpp) +add_plugin(EcontainsTgeoGeo PhysicalFunction nes-physical-operators EcontainsTgeoGeoPhysicalFunction.cpp) +add_plugin(EcoversTgeoGeo PhysicalFunction nes-physical-operators EcoversTgeoGeoPhysicalFunction.cpp) +add_plugin(EdisjointTgeoGeo PhysicalFunction nes-physical-operators EdisjointTgeoGeoPhysicalFunction.cpp) +add_plugin(EintersectsTgeoGeo PhysicalFunction nes-physical-operators EintersectsTgeoGeoPhysicalFunction.cpp) +add_plugin(EtouchesTgeoGeo PhysicalFunction nes-physical-operators EtouchesTgeoGeoPhysicalFunction.cpp) +add_plugin(EverEqTgeoGeo PhysicalFunction nes-physical-operators EverEqTgeoGeoPhysicalFunction.cpp) +add_plugin(EverNeTgeoGeo PhysicalFunction nes-physical-operators EverNeTgeoGeoPhysicalFunction.cpp) +add_plugin(AlwaysEqTgeoGeo PhysicalFunction nes-physical-operators AlwaysEqTgeoGeoPhysicalFunction.cpp) +add_plugin(AlwaysNeTgeoGeo PhysicalFunction nes-physical-operators AlwaysNeTgeoGeoPhysicalFunction.cpp) +add_plugin(NadTgeoGeo PhysicalFunction nes-physical-operators NadTgeoGeoPhysicalFunction.cpp) +add_plugin(EdwithinTgeoGeo PhysicalFunction nes-physical-operators EdwithinTgeoGeoPhysicalFunction.cpp) +add_plugin(AdwithinTgeoGeo PhysicalFunction nes-physical-operators AdwithinTgeoGeoPhysicalFunction.cpp) +add_plugin(AcontainsTgeoTgeo PhysicalFunction nes-physical-operators AcontainsTgeoTgeoPhysicalFunction.cpp) +add_plugin(AcoversTgeoTgeo PhysicalFunction nes-physical-operators AcoversTgeoTgeoPhysicalFunction.cpp) +add_plugin(AdisjointTgeoTgeo PhysicalFunction nes-physical-operators AdisjointTgeoTgeoPhysicalFunction.cpp) +add_plugin(AintersectsTgeoTgeo PhysicalFunction nes-physical-operators AintersectsTgeoTgeoPhysicalFunction.cpp) +add_plugin(AtouchesTgeoTgeo PhysicalFunction nes-physical-operators AtouchesTgeoTgeoPhysicalFunction.cpp) +add_plugin(EcontainsTgeoTgeo PhysicalFunction nes-physical-operators EcontainsTgeoTgeoPhysicalFunction.cpp) +add_plugin(EcoversTgeoTgeo PhysicalFunction nes-physical-operators EcoversTgeoTgeoPhysicalFunction.cpp) +add_plugin(EdisjointTgeoTgeo PhysicalFunction nes-physical-operators EdisjointTgeoTgeoPhysicalFunction.cpp) +add_plugin(EintersectsTgeoTgeo PhysicalFunction nes-physical-operators EintersectsTgeoTgeoPhysicalFunction.cpp) +add_plugin(EtouchesTgeoTgeo PhysicalFunction nes-physical-operators EtouchesTgeoTgeoPhysicalFunction.cpp) +add_plugin(EverEqTgeoTgeo PhysicalFunction nes-physical-operators EverEqTgeoTgeoPhysicalFunction.cpp) +add_plugin(EverNeTgeoTgeo PhysicalFunction nes-physical-operators EverNeTgeoTgeoPhysicalFunction.cpp) +add_plugin(AlwaysEqTgeoTgeo PhysicalFunction nes-physical-operators AlwaysEqTgeoTgeoPhysicalFunction.cpp) +add_plugin(AlwaysNeTgeoTgeo PhysicalFunction nes-physical-operators AlwaysNeTgeoTgeoPhysicalFunction.cpp) +add_plugin(NadTgeoTgeo PhysicalFunction nes-physical-operators NadTgeoTgeoPhysicalFunction.cpp) +add_plugin(EdwithinTgeoTgeo PhysicalFunction nes-physical-operators EdwithinTgeoTgeoPhysicalFunction.cpp) +add_plugin(AdwithinTgeoTgeo PhysicalFunction nes-physical-operators AdwithinTgeoTgeoPhysicalFunction.cpp) +add_plugin(AcontainsTcbufferGeo PhysicalFunction nes-physical-operators AcontainsTcbufferGeoPhysicalFunction.cpp) +add_plugin(AcoversTcbufferGeo PhysicalFunction nes-physical-operators AcoversTcbufferGeoPhysicalFunction.cpp) +add_plugin(AdisjointTcbufferGeo PhysicalFunction nes-physical-operators AdisjointTcbufferGeoPhysicalFunction.cpp) +add_plugin(AintersectsTcbufferGeo PhysicalFunction nes-physical-operators AintersectsTcbufferGeoPhysicalFunction.cpp) +add_plugin(AtouchesTcbufferGeo PhysicalFunction nes-physical-operators AtouchesTcbufferGeoPhysicalFunction.cpp) +add_plugin(EcontainsTcbufferGeo PhysicalFunction nes-physical-operators EcontainsTcbufferGeoPhysicalFunction.cpp) +add_plugin(EcoversTcbufferGeo PhysicalFunction nes-physical-operators EcoversTcbufferGeoPhysicalFunction.cpp) +add_plugin(EdisjointTcbufferGeo PhysicalFunction nes-physical-operators EdisjointTcbufferGeoPhysicalFunction.cpp) +add_plugin(EintersectsTcbufferGeo PhysicalFunction nes-physical-operators EintersectsTcbufferGeoPhysicalFunction.cpp) +add_plugin(EtouchesTcbufferGeo PhysicalFunction nes-physical-operators EtouchesTcbufferGeoPhysicalFunction.cpp) +add_plugin(NadTcbufferGeo PhysicalFunction nes-physical-operators NadTcbufferGeoPhysicalFunction.cpp) +add_plugin(EdwithinTcbufferGeo PhysicalFunction nes-physical-operators EdwithinTcbufferGeoPhysicalFunction.cpp) +add_plugin(AdwithinTcbufferGeo PhysicalFunction nes-physical-operators AdwithinTcbufferGeoPhysicalFunction.cpp) +add_plugin(AcontainsTcbufferTcbuffer PhysicalFunction nes-physical-operators AcontainsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AcoversTcbufferTcbuffer PhysicalFunction nes-physical-operators AcoversTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AdisjointTcbufferTcbuffer PhysicalFunction nes-physical-operators AdisjointTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AintersectsTcbufferTcbuffer PhysicalFunction nes-physical-operators AintersectsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AtouchesTcbufferTcbuffer PhysicalFunction nes-physical-operators AtouchesTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EcontainsTcbufferTcbuffer PhysicalFunction nes-physical-operators EcontainsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EcoversTcbufferTcbuffer PhysicalFunction nes-physical-operators EcoversTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EdisjointTcbufferTcbuffer PhysicalFunction nes-physical-operators EdisjointTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EintersectsTcbufferTcbuffer PhysicalFunction nes-physical-operators EintersectsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EtouchesTcbufferTcbuffer PhysicalFunction nes-physical-operators EtouchesTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EverEqTcbufferTcbuffer PhysicalFunction nes-physical-operators EverEqTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EverNeTcbufferTcbuffer PhysicalFunction nes-physical-operators EverNeTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AlwaysEqTcbufferTcbuffer PhysicalFunction nes-physical-operators AlwaysEqTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AlwaysNeTcbufferTcbuffer PhysicalFunction nes-physical-operators AlwaysNeTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(NadTcbufferTcbuffer PhysicalFunction nes-physical-operators NadTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(EdwithinTcbufferTcbuffer PhysicalFunction nes-physical-operators EdwithinTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(AdwithinTcbufferTcbuffer PhysicalFunction nes-physical-operators AdwithinTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(MindistanceTcbufferTcbuffer PhysicalFunction nes-physical-operators MindistanceTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(H3indexEq PhysicalFunction nes-physical-operators H3indexEqPhysicalFunction.cpp) +add_plugin(H3indexNe PhysicalFunction nes-physical-operators H3indexNePhysicalFunction.cpp) +add_plugin(H3indexLt PhysicalFunction nes-physical-operators H3indexLtPhysicalFunction.cpp) +add_plugin(H3indexLe PhysicalFunction nes-physical-operators H3indexLePhysicalFunction.cpp) +add_plugin(H3indexGt PhysicalFunction nes-physical-operators H3indexGtPhysicalFunction.cpp) +add_plugin(H3indexGe PhysicalFunction nes-physical-operators H3indexGePhysicalFunction.cpp) +add_plugin(H3indexCmp PhysicalFunction nes-physical-operators H3indexCmpPhysicalFunction.cpp) +add_plugin(H3indexOut PhysicalFunction nes-physical-operators H3indexOutPhysicalFunction.cpp) +add_plugin(Th3indexGetResolution PhysicalFunction nes-physical-operators Th3indexGetResolutionPhysicalFunction.cpp) +add_plugin(Th3indexGetBaseCellNumber PhysicalFunction nes-physical-operators Th3indexGetBaseCellNumberPhysicalFunction.cpp) +add_plugin(Th3indexIsValidCell PhysicalFunction nes-physical-operators Th3indexIsValidCellPhysicalFunction.cpp) +add_plugin(Th3indexIsPentagon PhysicalFunction nes-physical-operators Th3indexIsPentagonPhysicalFunction.cpp) +add_plugin(Th3indexCellToParent PhysicalFunction nes-physical-operators Th3indexCellToParentPhysicalFunction.cpp) +add_plugin(Th3indexCellToParentNext PhysicalFunction nes-physical-operators Th3indexCellToParentNextPhysicalFunction.cpp) +add_plugin(Th3indexCellToCenterChild PhysicalFunction nes-physical-operators Th3indexCellToCenterChildPhysicalFunction.cpp) +add_plugin(Th3indexCellToCenterChildNext PhysicalFunction nes-physical-operators Th3indexCellToCenterChildNextPhysicalFunction.cpp) +add_plugin(Th3indexCellToChildPos PhysicalFunction nes-physical-operators Th3indexCellToChildPosPhysicalFunction.cpp) +add_plugin(Th3indexAreNeighborCells PhysicalFunction nes-physical-operators Th3indexAreNeighborCellsPhysicalFunction.cpp) +add_plugin(Th3indexGridDistance PhysicalFunction nes-physical-operators Th3indexGridDistancePhysicalFunction.cpp) +add_plugin(EverEqTh3indexH3index PhysicalFunction nes-physical-operators EverEqTh3indexH3indexPhysicalFunction.cpp) +add_plugin(EverNeTh3indexH3index PhysicalFunction nes-physical-operators EverNeTh3indexH3indexPhysicalFunction.cpp) +add_plugin(AlwaysEqTh3indexH3index PhysicalFunction nes-physical-operators AlwaysEqTh3indexH3indexPhysicalFunction.cpp) +add_plugin(AlwaysNeTh3indexH3index PhysicalFunction nes-physical-operators AlwaysNeTh3indexH3indexPhysicalFunction.cpp) +add_plugin(QuadbinEq PhysicalFunction nes-physical-operators QuadbinEqPhysicalFunction.cpp) +add_plugin(QuadbinNe PhysicalFunction nes-physical-operators QuadbinNePhysicalFunction.cpp) +add_plugin(QuadbinLt PhysicalFunction nes-physical-operators QuadbinLtPhysicalFunction.cpp) +add_plugin(QuadbinLe PhysicalFunction nes-physical-operators QuadbinLePhysicalFunction.cpp) +add_plugin(QuadbinGt PhysicalFunction nes-physical-operators QuadbinGtPhysicalFunction.cpp) +add_plugin(QuadbinGe PhysicalFunction nes-physical-operators QuadbinGePhysicalFunction.cpp) +add_plugin(QuadbinCmp PhysicalFunction nes-physical-operators QuadbinCmpPhysicalFunction.cpp) +add_plugin(QuadbinGetResolution PhysicalFunction nes-physical-operators QuadbinGetResolutionPhysicalFunction.cpp) +add_plugin(QuadbinIsValidCell PhysicalFunction nes-physical-operators QuadbinIsValidCellPhysicalFunction.cpp) +add_plugin(QuadbinCellArea PhysicalFunction nes-physical-operators QuadbinCellAreaPhysicalFunction.cpp) +add_plugin(QuadbinCellToParent PhysicalFunction nes-physical-operators QuadbinCellToParentPhysicalFunction.cpp) +add_plugin(QuadbinCellToQuadkey PhysicalFunction nes-physical-operators QuadbinCellToQuadkeyPhysicalFunction.cpp) +add_plugin(QuadbinPointToCell PhysicalFunction nes-physical-operators QuadbinPointToCellPhysicalFunction.cpp) +add_plugin(QuadbinTileToCell PhysicalFunction nes-physical-operators QuadbinTileToCellPhysicalFunction.cpp) +add_plugin(EverEqTquadbinQuadbin PhysicalFunction nes-physical-operators EverEqTquadbinQuadbinPhysicalFunction.cpp) +add_plugin(EverNeTquadbinQuadbin PhysicalFunction nes-physical-operators EverNeTquadbinQuadbinPhysicalFunction.cpp) +add_plugin(AlwaysEqTquadbinQuadbin PhysicalFunction nes-physical-operators AlwaysEqTquadbinQuadbinPhysicalFunction.cpp) +add_plugin(AlwaysNeTquadbinQuadbin PhysicalFunction nes-physical-operators AlwaysNeTquadbinQuadbinPhysicalFunction.cpp) +add_plugin(EverEqTtextText PhysicalFunction nes-physical-operators EverEqTtextTextPhysicalFunction.cpp) +add_plugin(EverEqTextTtext PhysicalFunction nes-physical-operators EverEqTextTtextPhysicalFunction.cpp) +add_plugin(EverNeTtextText PhysicalFunction nes-physical-operators EverNeTtextTextPhysicalFunction.cpp) +add_plugin(EverNeTextTtext PhysicalFunction nes-physical-operators EverNeTextTtextPhysicalFunction.cpp) +add_plugin(EverGeTtextText PhysicalFunction nes-physical-operators EverGeTtextTextPhysicalFunction.cpp) +add_plugin(EverGeTextTtext PhysicalFunction nes-physical-operators EverGeTextTtextPhysicalFunction.cpp) +add_plugin(EverGtTtextText PhysicalFunction nes-physical-operators EverGtTtextTextPhysicalFunction.cpp) +add_plugin(EverGtTextTtext PhysicalFunction nes-physical-operators EverGtTextTtextPhysicalFunction.cpp) +add_plugin(EverLeTtextText PhysicalFunction nes-physical-operators EverLeTtextTextPhysicalFunction.cpp) +add_plugin(EverLeTextTtext PhysicalFunction nes-physical-operators EverLeTextTtextPhysicalFunction.cpp) +add_plugin(EverLtTtextText PhysicalFunction nes-physical-operators EverLtTtextTextPhysicalFunction.cpp) +add_plugin(EverLtTextTtext PhysicalFunction nes-physical-operators EverLtTextTtextPhysicalFunction.cpp) +add_plugin(AlwaysEqTtextText PhysicalFunction nes-physical-operators AlwaysEqTtextTextPhysicalFunction.cpp) +add_plugin(AlwaysEqTextTtext PhysicalFunction nes-physical-operators AlwaysEqTextTtextPhysicalFunction.cpp) +add_plugin(AlwaysNeTtextText PhysicalFunction nes-physical-operators AlwaysNeTtextTextPhysicalFunction.cpp) +add_plugin(AlwaysNeTextTtext PhysicalFunction nes-physical-operators AlwaysNeTextTtextPhysicalFunction.cpp) +add_plugin(AlwaysGeTtextText PhysicalFunction nes-physical-operators AlwaysGeTtextTextPhysicalFunction.cpp) +add_plugin(AlwaysGeTextTtext PhysicalFunction nes-physical-operators AlwaysGeTextTtextPhysicalFunction.cpp) +add_plugin(AlwaysGtTtextText PhysicalFunction nes-physical-operators AlwaysGtTtextTextPhysicalFunction.cpp) +add_plugin(AlwaysGtTextTtext PhysicalFunction nes-physical-operators AlwaysGtTextTtextPhysicalFunction.cpp) +add_plugin(AlwaysLeTtextText PhysicalFunction nes-physical-operators AlwaysLeTtextTextPhysicalFunction.cpp) +add_plugin(AlwaysLeTextTtext PhysicalFunction nes-physical-operators AlwaysLeTextTtextPhysicalFunction.cpp) +add_plugin(AlwaysLtTtextText PhysicalFunction nes-physical-operators AlwaysLtTtextTextPhysicalFunction.cpp) +add_plugin(AlwaysLtTextTtext PhysicalFunction nes-physical-operators AlwaysLtTextTtextPhysicalFunction.cpp) +add_plugin(TEqTtextText PhysicalFunction nes-physical-operators TEqTtextTextPhysicalFunction.cpp) +add_plugin(TEqTextTtext PhysicalFunction nes-physical-operators TEqTextTtextPhysicalFunction.cpp) +add_plugin(TNeTtextText PhysicalFunction nes-physical-operators TNeTtextTextPhysicalFunction.cpp) +add_plugin(TNeTextTtext PhysicalFunction nes-physical-operators TNeTextTtextPhysicalFunction.cpp) +add_plugin(TtextUpper PhysicalFunction nes-physical-operators TtextUpperPhysicalFunction.cpp) +add_plugin(TtextLower PhysicalFunction nes-physical-operators TtextLowerPhysicalFunction.cpp) +add_plugin(TtextInitcap PhysicalFunction nes-physical-operators TtextInitcapPhysicalFunction.cpp) +add_plugin(TextUpper PhysicalFunction nes-physical-operators TextUpperPhysicalFunction.cpp) +add_plugin(TextLower PhysicalFunction nes-physical-operators TextLowerPhysicalFunction.cpp) +add_plugin(TextInitcap PhysicalFunction nes-physical-operators TextInitcapPhysicalFunction.cpp) +add_plugin(TextcatTtextText PhysicalFunction nes-physical-operators TextcatTtextTextPhysicalFunction.cpp) +add_plugin(TextcatTextTtext PhysicalFunction nes-physical-operators TextcatTextTtextPhysicalFunction.cpp) +add_plugin(TextcatTtextTtext PhysicalFunction nes-physical-operators TextcatTtextTtextPhysicalFunction.cpp) +add_plugin(TGeTtextText PhysicalFunction nes-physical-operators TGeTtextTextPhysicalFunction.cpp) +add_plugin(TGeTextTtext PhysicalFunction nes-physical-operators TGeTextTtextPhysicalFunction.cpp) +add_plugin(TGtTtextText PhysicalFunction nes-physical-operators TGtTtextTextPhysicalFunction.cpp) +add_plugin(TGtTextTtext PhysicalFunction nes-physical-operators TGtTextTtextPhysicalFunction.cpp) +add_plugin(TLeTtextText PhysicalFunction nes-physical-operators TLeTtextTextPhysicalFunction.cpp) +add_plugin(TLeTextTtext PhysicalFunction nes-physical-operators TLeTextTtextPhysicalFunction.cpp) +add_plugin(TLtTtextText PhysicalFunction nes-physical-operators TLtTtextTextPhysicalFunction.cpp) +add_plugin(TLtTextTtext PhysicalFunction nes-physical-operators TLtTextTtextPhysicalFunction.cpp) +add_plugin(JsonbEq PhysicalFunction nes-physical-operators JsonbEqPhysicalFunction.cpp) +add_plugin(JsonbNe PhysicalFunction nes-physical-operators JsonbNePhysicalFunction.cpp) +add_plugin(JsonbLt PhysicalFunction nes-physical-operators JsonbLtPhysicalFunction.cpp) +add_plugin(JsonbLe PhysicalFunction nes-physical-operators JsonbLePhysicalFunction.cpp) +add_plugin(JsonbGt PhysicalFunction nes-physical-operators JsonbGtPhysicalFunction.cpp) +add_plugin(JsonbGe PhysicalFunction nes-physical-operators JsonbGePhysicalFunction.cpp) +add_plugin(JsonbCmp PhysicalFunction nes-physical-operators JsonbCmpPhysicalFunction.cpp) +add_plugin(JsonbContained PhysicalFunction nes-physical-operators JsonbContainedPhysicalFunction.cpp) +add_plugin(JsonbContains PhysicalFunction nes-physical-operators JsonbContainsPhysicalFunction.cpp) +add_plugin(JsonbExists PhysicalFunction nes-physical-operators JsonbExistsPhysicalFunction.cpp) +add_plugin(JsonbArrayLength PhysicalFunction nes-physical-operators JsonbArrayLengthPhysicalFunction.cpp) +add_plugin(JsonbToCstring PhysicalFunction nes-physical-operators JsonbToCstringPhysicalFunction.cpp) +add_plugin(JsonbPretty PhysicalFunction nes-physical-operators JsonbPrettyPhysicalFunction.cpp) +add_plugin(JsonbObjectFieldText PhysicalFunction nes-physical-operators JsonbObjectFieldTextPhysicalFunction.cpp) +add_plugin(JsonbArrayElementText PhysicalFunction nes-physical-operators JsonbArrayElementTextPhysicalFunction.cpp) +add_plugin(EverEqTjsonbJsonb PhysicalFunction nes-physical-operators EverEqTjsonbJsonbPhysicalFunction.cpp) +add_plugin(EverNeTjsonbJsonb PhysicalFunction nes-physical-operators EverNeTjsonbJsonbPhysicalFunction.cpp) +add_plugin(AlwaysEqTjsonbJsonb PhysicalFunction nes-physical-operators AlwaysEqTjsonbJsonbPhysicalFunction.cpp) +add_plugin(AlwaysNeTjsonbJsonb PhysicalFunction nes-physical-operators AlwaysNeTjsonbJsonbPhysicalFunction.cpp) +add_plugin(EverEqTjsonbTjsonb PhysicalFunction nes-physical-operators EverEqTjsonbTjsonbPhysicalFunction.cpp) +add_plugin(EverNeTjsonbTjsonb PhysicalFunction nes-physical-operators EverNeTjsonbTjsonbPhysicalFunction.cpp) +add_plugin(AlwaysEqTjsonbTjsonb PhysicalFunction nes-physical-operators AlwaysEqTjsonbTjsonbPhysicalFunction.cpp) +add_plugin(AlwaysNeTjsonbTjsonb PhysicalFunction nes-physical-operators AlwaysNeTjsonbTjsonbPhysicalFunction.cpp) +add_plugin(NadTnpointGeo PhysicalFunction nes-physical-operators NadTnpointGeoPhysicalFunction.cpp) +add_plugin(NadTnpointNpoint PhysicalFunction nes-physical-operators NadTnpointNpointPhysicalFunction.cpp) +add_plugin(NadTnpointTnpoint PhysicalFunction nes-physical-operators NadTnpointTnpointPhysicalFunction.cpp) +add_plugin(EverEqNpointTnpoint PhysicalFunction nes-physical-operators EverEqNpointTnpointPhysicalFunction.cpp) +add_plugin(EverEqTnpointNpoint PhysicalFunction nes-physical-operators EverEqTnpointNpointPhysicalFunction.cpp) +add_plugin(EverEqTnpointTnpoint PhysicalFunction nes-physical-operators EverEqTnpointTnpointPhysicalFunction.cpp) +add_plugin(EverNeNpointTnpoint PhysicalFunction nes-physical-operators EverNeNpointTnpointPhysicalFunction.cpp) +add_plugin(EverNeTnpointNpoint PhysicalFunction nes-physical-operators EverNeTnpointNpointPhysicalFunction.cpp) +add_plugin(EverNeTnpointTnpoint PhysicalFunction nes-physical-operators EverNeTnpointTnpointPhysicalFunction.cpp) +add_plugin(AlwaysEqNpointTnpoint PhysicalFunction nes-physical-operators AlwaysEqNpointTnpointPhysicalFunction.cpp) +add_plugin(AlwaysEqTnpointNpoint PhysicalFunction nes-physical-operators AlwaysEqTnpointNpointPhysicalFunction.cpp) +add_plugin(AlwaysEqTnpointTnpoint PhysicalFunction nes-physical-operators AlwaysEqTnpointTnpointPhysicalFunction.cpp) +add_plugin(AlwaysNeNpointTnpoint PhysicalFunction nes-physical-operators AlwaysNeNpointTnpointPhysicalFunction.cpp) +add_plugin(AlwaysNeTnpointNpoint PhysicalFunction nes-physical-operators AlwaysNeTnpointNpointPhysicalFunction.cpp) +add_plugin(AlwaysNeTnpointTnpoint PhysicalFunction nes-physical-operators AlwaysNeTnpointTnpointPhysicalFunction.cpp) +add_plugin(NadTposePose PhysicalFunction nes-physical-operators NadTposePosePhysicalFunction.cpp) +add_plugin(NadTposeTpose PhysicalFunction nes-physical-operators NadTposeTposePhysicalFunction.cpp) +add_plugin(NadTposeGeo PhysicalFunction nes-physical-operators NadTposeGeoPhysicalFunction.cpp) +add_plugin(EverEqPoseTpose PhysicalFunction nes-physical-operators EverEqPoseTposePhysicalFunction.cpp) +add_plugin(EverEqTposePose PhysicalFunction nes-physical-operators EverEqTposePosePhysicalFunction.cpp) +add_plugin(EverEqTposeTpose PhysicalFunction nes-physical-operators EverEqTposeTposePhysicalFunction.cpp) +add_plugin(EverNePoseTpose PhysicalFunction nes-physical-operators EverNePoseTposePhysicalFunction.cpp) +add_plugin(EverNeTposePose PhysicalFunction nes-physical-operators EverNeTposePosePhysicalFunction.cpp) +add_plugin(EverNeTposeTpose PhysicalFunction nes-physical-operators EverNeTposeTposePhysicalFunction.cpp) +add_plugin(AlwaysEqPoseTpose PhysicalFunction nes-physical-operators AlwaysEqPoseTposePhysicalFunction.cpp) +add_plugin(AlwaysEqTposePose PhysicalFunction nes-physical-operators AlwaysEqTposePosePhysicalFunction.cpp) +add_plugin(AlwaysEqTposeTpose PhysicalFunction nes-physical-operators AlwaysEqTposeTposePhysicalFunction.cpp) +add_plugin(AlwaysNePoseTpose PhysicalFunction nes-physical-operators AlwaysNePoseTposePhysicalFunction.cpp) +add_plugin(AlwaysNeTposePose PhysicalFunction nes-physical-operators AlwaysNeTposePosePhysicalFunction.cpp) +add_plugin(AlwaysNeTposeTpose PhysicalFunction nes-physical-operators AlwaysNeTposeTposePhysicalFunction.cpp) +add_plugin(GeomBoundary PhysicalFunction nes-physical-operators GeomBoundaryPhysicalFunction.cpp) +add_plugin(GeomCentroid PhysicalFunction nes-physical-operators GeomCentroidPhysicalFunction.cpp) +add_plugin(GeomConvexHull PhysicalFunction nes-physical-operators GeomConvexHullPhysicalFunction.cpp) +add_plugin(GeoReverse PhysicalFunction nes-physical-operators GeoReversePhysicalFunction.cpp) +add_plugin(GeoPoints PhysicalFunction nes-physical-operators GeoPointsPhysicalFunction.cpp) +add_plugin(GeomUnaryUnion PhysicalFunction nes-physical-operators GeomUnaryUnionPhysicalFunction.cpp) +add_plugin(GeoSetSrid PhysicalFunction nes-physical-operators GeoSetSridPhysicalFunction.cpp) +add_plugin(GeoRound PhysicalFunction nes-physical-operators GeoRoundPhysicalFunction.cpp) +add_plugin(GeoTransform PhysicalFunction nes-physical-operators GeoTransformPhysicalFunction.cpp) +add_plugin(GeoSrid PhysicalFunction nes-physical-operators GeoSridPhysicalFunction.cpp) +add_plugin(GeoNumGeos PhysicalFunction nes-physical-operators GeoNumGeosPhysicalFunction.cpp) +add_plugin(GeoNumPoints PhysicalFunction nes-physical-operators GeoNumPointsPhysicalFunction.cpp) +add_plugin(GeomLength PhysicalFunction nes-physical-operators GeomLengthPhysicalFunction.cpp) +add_plugin(GeomPerimeter PhysicalFunction nes-physical-operators GeomPerimeterPhysicalFunction.cpp) +add_plugin(GeomIsEmpty PhysicalFunction nes-physical-operators GeomIsEmptyPhysicalFunction.cpp) +add_plugin(GeomAzimuth PhysicalFunction nes-physical-operators GeomAzimuthPhysicalFunction.cpp) +add_plugin(GeoIsUnitary PhysicalFunction nes-physical-operators GeoIsUnitaryPhysicalFunction.cpp) +add_plugin(GeoEquals PhysicalFunction nes-physical-operators GeoEqualsPhysicalFunction.cpp) +add_plugin(GeoSame PhysicalFunction nes-physical-operators GeoSamePhysicalFunction.cpp) +add_plugin(GeomIntersects PhysicalFunction nes-physical-operators GeomIntersectsPhysicalFunction.cpp) +add_plugin(GeomIntersects2d PhysicalFunction nes-physical-operators GeomIntersects2dPhysicalFunction.cpp) +add_plugin(GeomIntersects3d PhysicalFunction nes-physical-operators GeomIntersects3dPhysicalFunction.cpp) +add_plugin(GeomContains PhysicalFunction nes-physical-operators GeomContainsPhysicalFunction.cpp) +add_plugin(GeomCovers PhysicalFunction nes-physical-operators GeomCoversPhysicalFunction.cpp) +add_plugin(GeomDisjoint2d PhysicalFunction nes-physical-operators GeomDisjoint2dPhysicalFunction.cpp) +add_plugin(GeomTouches PhysicalFunction nes-physical-operators GeomTouchesPhysicalFunction.cpp) +add_plugin(GeogIntersects PhysicalFunction nes-physical-operators GeogIntersectsPhysicalFunction.cpp) +add_plugin(GeogDistance PhysicalFunction nes-physical-operators GeogDistancePhysicalFunction.cpp) +add_plugin(LineLocatePoint PhysicalFunction nes-physical-operators LineLocatePointPhysicalFunction.cpp) +add_plugin(GeomDistance2d PhysicalFunction nes-physical-operators GeomDistance2dPhysicalFunction.cpp) +add_plugin(GeomDistance3d PhysicalFunction nes-physical-operators GeomDistance3dPhysicalFunction.cpp) +add_plugin(GeomDwithin2d PhysicalFunction nes-physical-operators GeomDwithin2dPhysicalFunction.cpp) +add_plugin(GeomDwithin3d PhysicalFunction nes-physical-operators GeomDwithin3dPhysicalFunction.cpp) +add_plugin(GeogDwithin PhysicalFunction nes-physical-operators GeogDwithinPhysicalFunction.cpp) +add_plugin(GeomDwithin PhysicalFunction nes-physical-operators GeomDwithinPhysicalFunction.cpp) +add_plugin(GeomIntersection2d PhysicalFunction nes-physical-operators GeomIntersection2dPhysicalFunction.cpp) +add_plugin(GeomIntersection2dColl PhysicalFunction nes-physical-operators GeomIntersection2dCollPhysicalFunction.cpp) +add_plugin(GeomDifference2d PhysicalFunction nes-physical-operators GeomDifference2dPhysicalFunction.cpp) +add_plugin(GeomShortestline2d PhysicalFunction nes-physical-operators GeomShortestline2dPhysicalFunction.cpp) +add_plugin(GeomShortestline3d PhysicalFunction nes-physical-operators GeomShortestline3dPhysicalFunction.cpp) +add_plugin(LineInterpolatePoint PhysicalFunction nes-physical-operators LineInterpolatePointPhysicalFunction.cpp) +add_plugin(LineSubstring PhysicalFunction nes-physical-operators LineSubstringPhysicalFunction.cpp) +add_plugin(LineNumpoints PhysicalFunction nes-physical-operators LineNumpointsPhysicalFunction.cpp) +add_plugin(LinePointN PhysicalFunction nes-physical-operators LinePointNPhysicalFunction.cpp) +add_plugin(GeoGeoN PhysicalFunction nes-physical-operators GeoGeoNPhysicalFunction.cpp) +add_plugin(GeoAsEwkt PhysicalFunction nes-physical-operators GeoAsEwktPhysicalFunction.cpp) +add_plugin(GeoAsGeojson PhysicalFunction nes-physical-operators GeoAsGeojsonPhysicalFunction.cpp) +add_plugin(GeomPointMake2d PhysicalFunction nes-physical-operators GeomPointMake2dPhysicalFunction.cpp) +add_plugin(GeomPointMake3dz PhysicalFunction nes-physical-operators GeomPointMake3dzPhysicalFunction.cpp) +add_plugin(GeogPointMake2d PhysicalFunction nes-physical-operators GeogPointMake2dPhysicalFunction.cpp) +add_plugin(GeogPointMake3dz PhysicalFunction nes-physical-operators GeogPointMake3dzPhysicalFunction.cpp) +add_plugin(GeogArea PhysicalFunction nes-physical-operators GeogAreaPhysicalFunction.cpp) +add_plugin(GeogLength PhysicalFunction nes-physical-operators GeogLengthPhysicalFunction.cpp) +add_plugin(GeogPerimeter PhysicalFunction nes-physical-operators GeogPerimeterPhysicalFunction.cpp) +add_plugin(GeogToGeom PhysicalFunction nes-physical-operators GeogToGeomPhysicalFunction.cpp) +add_plugin(GeomToGeog PhysicalFunction nes-physical-operators GeomToGeogPhysicalFunction.cpp) +add_plugin(GeogCentroid PhysicalFunction nes-physical-operators GeogCentroidPhysicalFunction.cpp) +add_plugin(IntspanLower PhysicalFunction nes-physical-operators IntspanLowerPhysicalFunction.cpp) +add_plugin(IntspanUpper PhysicalFunction nes-physical-operators IntspanUpperPhysicalFunction.cpp) +add_plugin(IntspanWidth PhysicalFunction nes-physical-operators IntspanWidthPhysicalFunction.cpp) +add_plugin(IntspanLowerInc PhysicalFunction nes-physical-operators IntspanLowerIncPhysicalFunction.cpp) +add_plugin(IntspanUpperInc PhysicalFunction nes-physical-operators IntspanUpperIncPhysicalFunction.cpp) +add_plugin(FloatspanLower PhysicalFunction nes-physical-operators FloatspanLowerPhysicalFunction.cpp) +add_plugin(FloatspanUpper PhysicalFunction nes-physical-operators FloatspanUpperPhysicalFunction.cpp) +add_plugin(FloatspanWidth PhysicalFunction nes-physical-operators FloatspanWidthPhysicalFunction.cpp) +add_plugin(FloatspanLowerInc PhysicalFunction nes-physical-operators FloatspanLowerIncPhysicalFunction.cpp) +add_plugin(FloatspanUpperInc PhysicalFunction nes-physical-operators FloatspanUpperIncPhysicalFunction.cpp) +add_plugin(ContainedIntSpan PhysicalFunction nes-physical-operators ContainedIntSpanPhysicalFunction.cpp) +add_plugin(ContainedFloatSpan PhysicalFunction nes-physical-operators ContainedFloatSpanPhysicalFunction.cpp) +add_plugin(ContainedSpanSpan PhysicalFunction nes-physical-operators ContainedSpanSpanPhysicalFunction.cpp) +add_plugin(ContainedFloatspanSpan PhysicalFunction nes-physical-operators ContainedFloatspanSpanPhysicalFunction.cpp) +add_plugin(ContainsSpanInt PhysicalFunction nes-physical-operators ContainsSpanIntPhysicalFunction.cpp) +add_plugin(ContainsSpanFloat PhysicalFunction nes-physical-operators ContainsSpanFloatPhysicalFunction.cpp) +add_plugin(ContainsSpanSpan PhysicalFunction nes-physical-operators ContainsSpanSpanPhysicalFunction.cpp) +add_plugin(ContainsFloatspanSpan PhysicalFunction nes-physical-operators ContainsFloatspanSpanPhysicalFunction.cpp) +add_plugin(AcontainsGeoTrgeometry PhysicalFunction nes-physical-operators AcontainsGeoTrgeometryPhysicalFunction.cpp) +add_plugin(AcoversGeoTrgeometry PhysicalFunction nes-physical-operators AcoversGeoTrgeometryPhysicalFunction.cpp) +add_plugin(AcoversTrgeometryGeo PhysicalFunction nes-physical-operators AcoversTrgeometryGeoPhysicalFunction.cpp) +add_plugin(AdisjointTrgeometryGeo PhysicalFunction nes-physical-operators AdisjointTrgeometryGeoPhysicalFunction.cpp) +add_plugin(AdisjointTrgeometryTrgeometry PhysicalFunction nes-physical-operators AdisjointTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(AdwithinTrgeometryGeo PhysicalFunction nes-physical-operators AdwithinTrgeometryGeoPhysicalFunction.cpp) +add_plugin(AdwithinTrgeometryTrgeometry PhysicalFunction nes-physical-operators AdwithinTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(AintersectsTrgeometryGeo PhysicalFunction nes-physical-operators AintersectsTrgeometryGeoPhysicalFunction.cpp) +add_plugin(AintersectsTrgeometryTrgeometry PhysicalFunction nes-physical-operators AintersectsTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(AlwaysEqGeoTrgeometry PhysicalFunction nes-physical-operators AlwaysEqGeoTrgeometryPhysicalFunction.cpp) +add_plugin(AlwaysEqTrgeometryGeo PhysicalFunction nes-physical-operators AlwaysEqTrgeometryGeoPhysicalFunction.cpp) +add_plugin(AlwaysEqTrgeometryTrgeometry PhysicalFunction nes-physical-operators AlwaysEqTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(AlwaysNeGeoTrgeometry PhysicalFunction nes-physical-operators AlwaysNeGeoTrgeometryPhysicalFunction.cpp) +add_plugin(AlwaysNeTrgeometryGeo PhysicalFunction nes-physical-operators AlwaysNeTrgeometryGeoPhysicalFunction.cpp) +add_plugin(AlwaysNeTrgeometryTrgeometry PhysicalFunction nes-physical-operators AlwaysNeTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(AtouchesTrgeometryGeo PhysicalFunction nes-physical-operators AtouchesTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EcontainsGeoTrgeometry PhysicalFunction nes-physical-operators EcontainsGeoTrgeometryPhysicalFunction.cpp) +add_plugin(EcoversGeoTrgeometry PhysicalFunction nes-physical-operators EcoversGeoTrgeometryPhysicalFunction.cpp) +add_plugin(EcoversTrgeometryGeo PhysicalFunction nes-physical-operators EcoversTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EdisjointTrgeometryGeo PhysicalFunction nes-physical-operators EdisjointTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EdisjointTrgeometryTrgeometry PhysicalFunction nes-physical-operators EdisjointTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(EdwithinTrgeometryGeo PhysicalFunction nes-physical-operators EdwithinTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EdwithinTrgeometryTrgeometry PhysicalFunction nes-physical-operators EdwithinTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(EintersectsTrgeometryGeo PhysicalFunction nes-physical-operators EintersectsTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EintersectsTrgeometryTrgeometry PhysicalFunction nes-physical-operators EintersectsTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(EtouchesTrgeometryGeo PhysicalFunction nes-physical-operators EtouchesTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EverEqGeoTrgeometry PhysicalFunction nes-physical-operators EverEqGeoTrgeometryPhysicalFunction.cpp) +add_plugin(EverEqTrgeometryGeo PhysicalFunction nes-physical-operators EverEqTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EverEqTrgeometryTrgeometry PhysicalFunction nes-physical-operators EverEqTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(EverNeGeoTrgeometry PhysicalFunction nes-physical-operators EverNeGeoTrgeometryPhysicalFunction.cpp) +add_plugin(EverNeTrgeometryGeo PhysicalFunction nes-physical-operators EverNeTrgeometryGeoPhysicalFunction.cpp) +add_plugin(EverNeTrgeometryTrgeometry PhysicalFunction nes-physical-operators EverNeTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(NadTrgeometryGeo PhysicalFunction nes-physical-operators NadTrgeometryGeoPhysicalFunction.cpp) +add_plugin(NadTrgeometryTrgeometry PhysicalFunction nes-physical-operators NadTrgeometryTrgeometryPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTPoseGeometry PhysicalFunction nes-physical-operators TemporalEIntersectsTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTPoseGeometry PhysicalFunction nes-physical-operators TemporalAIntersectsTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalECoversTPoseGeometry PhysicalFunction nes-physical-operators TemporalECoversTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDisjointTPoseGeometry PhysicalFunction nes-physical-operators TemporalEDisjointTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalADisjointTPoseGeometry PhysicalFunction nes-physical-operators TemporalADisjointTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalETouchesTPoseGeometry PhysicalFunction nes-physical-operators TemporalETouchesTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalATouchesTPoseGeometry PhysicalFunction nes-physical-operators TemporalATouchesTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalEContainsTPoseGeometry PhysicalFunction nes-physical-operators TemporalEContainsTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalAContainsTPoseGeometry PhysicalFunction nes-physical-operators TemporalAContainsTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTPoseGeometry PhysicalFunction nes-physical-operators TemporalEDWithinTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalADWithinTPoseGeometry PhysicalFunction nes-physical-operators TemporalADWithinTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTPoseTPose PhysicalFunction nes-physical-operators TemporalEIntersectsTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTPoseTPose PhysicalFunction nes-physical-operators TemporalAIntersectsTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalECoversTPoseTPose PhysicalFunction nes-physical-operators TemporalECoversTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalEDisjointTPoseTPose PhysicalFunction nes-physical-operators TemporalEDisjointTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalADisjointTPoseTPose PhysicalFunction nes-physical-operators TemporalADisjointTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalETouchesTPoseTPose PhysicalFunction nes-physical-operators TemporalETouchesTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalATouchesTPoseTPose PhysicalFunction nes-physical-operators TemporalATouchesTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalEContainsTPoseTPose PhysicalFunction nes-physical-operators TemporalEContainsTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalAContainsTPoseTPose PhysicalFunction nes-physical-operators TemporalAContainsTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalEDWithinTPoseTPose PhysicalFunction nes-physical-operators TemporalEDWithinTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalADWithinTPoseTPose PhysicalFunction nes-physical-operators TemporalADWithinTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalNADTPoseGeometry PhysicalFunction nes-physical-operators TemporalNADTPoseGeometryPhysicalFunction.cpp) +add_plugin(TemporalNADTPoseTPose PhysicalFunction nes-physical-operators TemporalNADTPoseTPosePhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTNpointGeometry PhysicalFunction nes-physical-operators TemporalEIntersectsTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTNpointGeometry PhysicalFunction nes-physical-operators TemporalAIntersectsTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalECoversTNpointGeometry PhysicalFunction nes-physical-operators TemporalECoversTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDisjointTNpointGeometry PhysicalFunction nes-physical-operators TemporalEDisjointTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalADisjointTNpointGeometry PhysicalFunction nes-physical-operators TemporalADisjointTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalETouchesTNpointGeometry PhysicalFunction nes-physical-operators TemporalETouchesTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalATouchesTNpointGeometry PhysicalFunction nes-physical-operators TemporalATouchesTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalEContainsTNpointGeometry PhysicalFunction nes-physical-operators TemporalEContainsTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalAContainsTNpointGeometry PhysicalFunction nes-physical-operators TemporalAContainsTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTNpointGeometry PhysicalFunction nes-physical-operators TemporalEDWithinTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalADWithinTNpointGeometry PhysicalFunction nes-physical-operators TemporalADWithinTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTNpointTNpoint PhysicalFunction nes-physical-operators TemporalEIntersectsTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTNpointTNpoint PhysicalFunction nes-physical-operators TemporalAIntersectsTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalECoversTNpointTNpoint PhysicalFunction nes-physical-operators TemporalECoversTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalEDisjointTNpointTNpoint PhysicalFunction nes-physical-operators TemporalEDisjointTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalADisjointTNpointTNpoint PhysicalFunction nes-physical-operators TemporalADisjointTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalETouchesTNpointTNpoint PhysicalFunction nes-physical-operators TemporalETouchesTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalATouchesTNpointTNpoint PhysicalFunction nes-physical-operators TemporalATouchesTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalEContainsTNpointTNpoint PhysicalFunction nes-physical-operators TemporalEContainsTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalAContainsTNpointTNpoint PhysicalFunction nes-physical-operators TemporalAContainsTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTNpointTNpoint PhysicalFunction nes-physical-operators TemporalEDWithinTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalADWithinTNpointTNpoint PhysicalFunction nes-physical-operators TemporalADWithinTNpointTNpointPhysicalFunction.cpp) +add_plugin(TemporalNADTNpointGeometry PhysicalFunction nes-physical-operators TemporalNADTNpointGeometryPhysicalFunction.cpp) +add_plugin(TemporalNADTNpointTNpoint PhysicalFunction nes-physical-operators TemporalNADTNpointTNpointPhysicalFunction.cpp) +add_plugin(AboveStboxStbox PhysicalFunction nes-physical-operators AboveStboxStboxPhysicalFunction.cpp) +add_plugin(AdjacentStboxStbox PhysicalFunction nes-physical-operators AdjacentStboxStboxPhysicalFunction.cpp) +add_plugin(AfterStboxStbox PhysicalFunction nes-physical-operators AfterStboxStboxPhysicalFunction.cpp) +add_plugin(BackStboxStbox PhysicalFunction nes-physical-operators BackStboxStboxPhysicalFunction.cpp) +add_plugin(BeforeStboxStbox PhysicalFunction nes-physical-operators BeforeStboxStboxPhysicalFunction.cpp) +add_plugin(BelowStboxStbox PhysicalFunction nes-physical-operators BelowStboxStboxPhysicalFunction.cpp) +add_plugin(ContainedStboxStbox PhysicalFunction nes-physical-operators ContainedStboxStboxPhysicalFunction.cpp) +add_plugin(ContainsStboxStbox PhysicalFunction nes-physical-operators ContainsStboxStboxPhysicalFunction.cpp) +add_plugin(FrontStboxStbox PhysicalFunction nes-physical-operators FrontStboxStboxPhysicalFunction.cpp) +add_plugin(LeftStboxStbox PhysicalFunction nes-physical-operators LeftStboxStboxPhysicalFunction.cpp) +add_plugin(OveraboveStboxStbox PhysicalFunction nes-physical-operators OveraboveStboxStboxPhysicalFunction.cpp) +add_plugin(OverafterStboxStbox PhysicalFunction nes-physical-operators OverafterStboxStboxPhysicalFunction.cpp) +add_plugin(OverbackStboxStbox PhysicalFunction nes-physical-operators OverbackStboxStboxPhysicalFunction.cpp) +add_plugin(OverbeforeStboxStbox PhysicalFunction nes-physical-operators OverbeforeStboxStboxPhysicalFunction.cpp) +add_plugin(OverbelowStboxStbox PhysicalFunction nes-physical-operators OverbelowStboxStboxPhysicalFunction.cpp) +add_plugin(OverfrontStboxStbox PhysicalFunction nes-physical-operators OverfrontStboxStboxPhysicalFunction.cpp) +add_plugin(OverlapsStboxStbox PhysicalFunction nes-physical-operators OverlapsStboxStboxPhysicalFunction.cpp) +add_plugin(OverleftStboxStbox PhysicalFunction nes-physical-operators OverleftStboxStboxPhysicalFunction.cpp) +add_plugin(OverrightStboxStbox PhysicalFunction nes-physical-operators OverrightStboxStboxPhysicalFunction.cpp) +add_plugin(RightStboxStbox PhysicalFunction nes-physical-operators RightStboxStboxPhysicalFunction.cpp) +add_plugin(SameStboxStbox PhysicalFunction nes-physical-operators SameStboxStboxPhysicalFunction.cpp) +add_plugin(StboxEq PhysicalFunction nes-physical-operators StboxEqPhysicalFunction.cpp) +add_plugin(StboxGe PhysicalFunction nes-physical-operators StboxGePhysicalFunction.cpp) +add_plugin(StboxGt PhysicalFunction nes-physical-operators StboxGtPhysicalFunction.cpp) +add_plugin(StboxLe PhysicalFunction nes-physical-operators StboxLePhysicalFunction.cpp) +add_plugin(StboxLt PhysicalFunction nes-physical-operators StboxLtPhysicalFunction.cpp) +add_plugin(StboxNe PhysicalFunction nes-physical-operators StboxNePhysicalFunction.cpp) +add_plugin(NadStboxStbox PhysicalFunction nes-physical-operators NadStboxStboxPhysicalFunction.cpp) +add_plugin(StboxCmp PhysicalFunction nes-physical-operators StboxCmpPhysicalFunction.cpp) +add_plugin(AboveStboxTspatial PhysicalFunction nes-physical-operators AboveStboxTspatialPhysicalFunction.cpp) +add_plugin(AdjacentStboxTspatial PhysicalFunction nes-physical-operators AdjacentStboxTspatialPhysicalFunction.cpp) +add_plugin(AfterStboxTspatial PhysicalFunction nes-physical-operators AfterStboxTspatialPhysicalFunction.cpp) +add_plugin(BackStboxTspatial PhysicalFunction nes-physical-operators BackStboxTspatialPhysicalFunction.cpp) +add_plugin(BeforeStboxTspatial PhysicalFunction nes-physical-operators BeforeStboxTspatialPhysicalFunction.cpp) +add_plugin(BelowStboxTspatial PhysicalFunction nes-physical-operators BelowStboxTspatialPhysicalFunction.cpp) +add_plugin(ContainedStboxTspatial PhysicalFunction nes-physical-operators ContainedStboxTspatialPhysicalFunction.cpp) +add_plugin(ContainsStboxTspatial PhysicalFunction nes-physical-operators ContainsStboxTspatialPhysicalFunction.cpp) +add_plugin(FrontStboxTspatial PhysicalFunction nes-physical-operators FrontStboxTspatialPhysicalFunction.cpp) +add_plugin(LeftStboxTspatial PhysicalFunction nes-physical-operators LeftStboxTspatialPhysicalFunction.cpp) +add_plugin(OveraboveStboxTspatial PhysicalFunction nes-physical-operators OveraboveStboxTspatialPhysicalFunction.cpp) +add_plugin(OverafterStboxTspatial PhysicalFunction nes-physical-operators OverafterStboxTspatialPhysicalFunction.cpp) +add_plugin(OverbackStboxTspatial PhysicalFunction nes-physical-operators OverbackStboxTspatialPhysicalFunction.cpp) +add_plugin(OverbeforeStboxTspatial PhysicalFunction nes-physical-operators OverbeforeStboxTspatialPhysicalFunction.cpp) +add_plugin(OverbelowStboxTspatial PhysicalFunction nes-physical-operators OverbelowStboxTspatialPhysicalFunction.cpp) +add_plugin(OverfrontStboxTspatial PhysicalFunction nes-physical-operators OverfrontStboxTspatialPhysicalFunction.cpp) +add_plugin(OverlapsStboxTspatial PhysicalFunction nes-physical-operators OverlapsStboxTspatialPhysicalFunction.cpp) +add_plugin(OverleftStboxTspatial PhysicalFunction nes-physical-operators OverleftStboxTspatialPhysicalFunction.cpp) +add_plugin(OverrightStboxTspatial PhysicalFunction nes-physical-operators OverrightStboxTspatialPhysicalFunction.cpp) +add_plugin(RightStboxTspatial PhysicalFunction nes-physical-operators RightStboxTspatialPhysicalFunction.cpp) +add_plugin(SameStboxTspatial PhysicalFunction nes-physical-operators SameStboxTspatialPhysicalFunction.cpp) +add_plugin(AboveTspatialStbox PhysicalFunction nes-physical-operators AboveTspatialStboxPhysicalFunction.cpp) +add_plugin(AdjacentTspatialStbox PhysicalFunction nes-physical-operators AdjacentTspatialStboxPhysicalFunction.cpp) +add_plugin(AfterTspatialStbox PhysicalFunction nes-physical-operators AfterTspatialStboxPhysicalFunction.cpp) +add_plugin(BackTspatialStbox PhysicalFunction nes-physical-operators BackTspatialStboxPhysicalFunction.cpp) +add_plugin(BeforeTspatialStbox PhysicalFunction nes-physical-operators BeforeTspatialStboxPhysicalFunction.cpp) +add_plugin(BelowTspatialStbox PhysicalFunction nes-physical-operators BelowTspatialStboxPhysicalFunction.cpp) +add_plugin(ContainedTspatialStbox PhysicalFunction nes-physical-operators ContainedTspatialStboxPhysicalFunction.cpp) +add_plugin(ContainsTspatialStbox PhysicalFunction nes-physical-operators ContainsTspatialStboxPhysicalFunction.cpp) +add_plugin(FrontTspatialStbox PhysicalFunction nes-physical-operators FrontTspatialStboxPhysicalFunction.cpp) +add_plugin(LeftTspatialStbox PhysicalFunction nes-physical-operators LeftTspatialStboxPhysicalFunction.cpp) +add_plugin(OveraboveTspatialStbox PhysicalFunction nes-physical-operators OveraboveTspatialStboxPhysicalFunction.cpp) +add_plugin(OverafterTspatialStbox PhysicalFunction nes-physical-operators OverafterTspatialStboxPhysicalFunction.cpp) +add_plugin(OverbackTspatialStbox PhysicalFunction nes-physical-operators OverbackTspatialStboxPhysicalFunction.cpp) +add_plugin(OverbeforeTspatialStbox PhysicalFunction nes-physical-operators OverbeforeTspatialStboxPhysicalFunction.cpp) +add_plugin(OverbelowTspatialStbox PhysicalFunction nes-physical-operators OverbelowTspatialStboxPhysicalFunction.cpp) +add_plugin(OverfrontTspatialStbox PhysicalFunction nes-physical-operators OverfrontTspatialStboxPhysicalFunction.cpp) +add_plugin(OverlapsTspatialStbox PhysicalFunction nes-physical-operators OverlapsTspatialStboxPhysicalFunction.cpp) +add_plugin(OverleftTspatialStbox PhysicalFunction nes-physical-operators OverleftTspatialStboxPhysicalFunction.cpp) +add_plugin(OverrightTspatialStbox PhysicalFunction nes-physical-operators OverrightTspatialStboxPhysicalFunction.cpp) +add_plugin(RightTspatialStbox PhysicalFunction nes-physical-operators RightTspatialStboxPhysicalFunction.cpp) +add_plugin(SameTspatialStbox PhysicalFunction nes-physical-operators SameTspatialStboxPhysicalFunction.cpp) +add_plugin(NadTgeoStbox PhysicalFunction nes-physical-operators NadTgeoStboxPhysicalFunction.cpp) +add_plugin(AdjacentTboxTnumber PhysicalFunction nes-physical-operators AdjacentTboxTnumberPhysicalFunction.cpp) +add_plugin(AfterTboxTnumber PhysicalFunction nes-physical-operators AfterTboxTnumberPhysicalFunction.cpp) +add_plugin(BeforeTboxTnumber PhysicalFunction nes-physical-operators BeforeTboxTnumberPhysicalFunction.cpp) +add_plugin(ContainedTboxTnumber PhysicalFunction nes-physical-operators ContainedTboxTnumberPhysicalFunction.cpp) +add_plugin(ContainsTboxTnumber PhysicalFunction nes-physical-operators ContainsTboxTnumberPhysicalFunction.cpp) +add_plugin(LeftTboxTnumber PhysicalFunction nes-physical-operators LeftTboxTnumberPhysicalFunction.cpp) +add_plugin(OverafterTboxTnumber PhysicalFunction nes-physical-operators OverafterTboxTnumberPhysicalFunction.cpp) +add_plugin(OverbeforeTboxTnumber PhysicalFunction nes-physical-operators OverbeforeTboxTnumberPhysicalFunction.cpp) +add_plugin(OverlapsTboxTnumber PhysicalFunction nes-physical-operators OverlapsTboxTnumberPhysicalFunction.cpp) +add_plugin(OverleftTboxTnumber PhysicalFunction nes-physical-operators OverleftTboxTnumberPhysicalFunction.cpp) +add_plugin(OverrightTboxTnumber PhysicalFunction nes-physical-operators OverrightTboxTnumberPhysicalFunction.cpp) +add_plugin(RightTboxTnumber PhysicalFunction nes-physical-operators RightTboxTnumberPhysicalFunction.cpp) +add_plugin(SameTboxTnumber PhysicalFunction nes-physical-operators SameTboxTnumberPhysicalFunction.cpp) +add_plugin(AdjacentTnumberTbox PhysicalFunction nes-physical-operators AdjacentTnumberTboxPhysicalFunction.cpp) +add_plugin(AfterTnumberTbox PhysicalFunction nes-physical-operators AfterTnumberTboxPhysicalFunction.cpp) +add_plugin(BeforeTnumberTbox PhysicalFunction nes-physical-operators BeforeTnumberTboxPhysicalFunction.cpp) +add_plugin(ContainedTnumberTbox PhysicalFunction nes-physical-operators ContainedTnumberTboxPhysicalFunction.cpp) +add_plugin(ContainsTnumberTbox PhysicalFunction nes-physical-operators ContainsTnumberTboxPhysicalFunction.cpp) +add_plugin(LeftTnumberTbox PhysicalFunction nes-physical-operators LeftTnumberTboxPhysicalFunction.cpp) +add_plugin(OverafterTnumberTbox PhysicalFunction nes-physical-operators OverafterTnumberTboxPhysicalFunction.cpp) +add_plugin(OverbeforeTnumberTbox PhysicalFunction nes-physical-operators OverbeforeTnumberTboxPhysicalFunction.cpp) +add_plugin(OverlapsTnumberTbox PhysicalFunction nes-physical-operators OverlapsTnumberTboxPhysicalFunction.cpp) +add_plugin(OverleftTnumberTbox PhysicalFunction nes-physical-operators OverleftTnumberTboxPhysicalFunction.cpp) +add_plugin(OverrightTnumberTbox PhysicalFunction nes-physical-operators OverrightTnumberTboxPhysicalFunction.cpp) +add_plugin(RightTnumberTbox PhysicalFunction nes-physical-operators RightTnumberTboxPhysicalFunction.cpp) +add_plugin(SameTnumberTbox PhysicalFunction nes-physical-operators SameTnumberTboxPhysicalFunction.cpp) +add_plugin(NadTfloatTbox PhysicalFunction nes-physical-operators NadTfloatTboxPhysicalFunction.cpp) +add_plugin(NadTintTbox PhysicalFunction nes-physical-operators NadTintTboxPhysicalFunction.cpp) +add_plugin(AdjacentTnumberTnumber PhysicalFunction nes-physical-operators AdjacentTnumberTnumberPhysicalFunction.cpp) +add_plugin(AfterTnumberTnumber PhysicalFunction nes-physical-operators AfterTnumberTnumberPhysicalFunction.cpp) +add_plugin(BeforeTnumberTnumber PhysicalFunction nes-physical-operators BeforeTnumberTnumberPhysicalFunction.cpp) +add_plugin(ContainedTnumberTnumber PhysicalFunction nes-physical-operators ContainedTnumberTnumberPhysicalFunction.cpp) +add_plugin(ContainsTnumberTnumber PhysicalFunction nes-physical-operators ContainsTnumberTnumberPhysicalFunction.cpp) +add_plugin(LeftTnumberTnumber PhysicalFunction nes-physical-operators LeftTnumberTnumberPhysicalFunction.cpp) +add_plugin(OverafterTnumberTnumber PhysicalFunction nes-physical-operators OverafterTnumberTnumberPhysicalFunction.cpp) +add_plugin(OverbeforeTnumberTnumber PhysicalFunction nes-physical-operators OverbeforeTnumberTnumberPhysicalFunction.cpp) +add_plugin(OverlapsTnumberTnumber PhysicalFunction nes-physical-operators OverlapsTnumberTnumberPhysicalFunction.cpp) +add_plugin(OverleftTnumberTnumber PhysicalFunction nes-physical-operators OverleftTnumberTnumberPhysicalFunction.cpp) +add_plugin(OverrightTnumberTnumber PhysicalFunction nes-physical-operators OverrightTnumberTnumberPhysicalFunction.cpp) +add_plugin(RightTnumberTnumber PhysicalFunction nes-physical-operators RightTnumberTnumberPhysicalFunction.cpp) +add_plugin(SameTnumberTnumber PhysicalFunction nes-physical-operators SameTnumberTnumberPhysicalFunction.cpp) +add_plugin(TboolEndValue PhysicalFunction nes-physical-operators TboolEndValuePhysicalFunction.cpp) +add_plugin(TboolStartValue PhysicalFunction nes-physical-operators TboolStartValuePhysicalFunction.cpp) +add_plugin(AboveTspatialTspatial PhysicalFunction nes-physical-operators AboveTspatialTspatialPhysicalFunction.cpp) +add_plugin(AdjacentTspatialTspatial PhysicalFunction nes-physical-operators AdjacentTspatialTspatialPhysicalFunction.cpp) +add_plugin(AfterTspatialTspatial PhysicalFunction nes-physical-operators AfterTspatialTspatialPhysicalFunction.cpp) +add_plugin(BackTspatialTspatial PhysicalFunction nes-physical-operators BackTspatialTspatialPhysicalFunction.cpp) +add_plugin(BeforeTspatialTspatial PhysicalFunction nes-physical-operators BeforeTspatialTspatialPhysicalFunction.cpp) +add_plugin(BelowTspatialTspatial PhysicalFunction nes-physical-operators BelowTspatialTspatialPhysicalFunction.cpp) +add_plugin(ContainedTspatialTspatial PhysicalFunction nes-physical-operators ContainedTspatialTspatialPhysicalFunction.cpp) +add_plugin(ContainsTspatialTspatial PhysicalFunction nes-physical-operators ContainsTspatialTspatialPhysicalFunction.cpp) +add_plugin(FrontTspatialTspatial PhysicalFunction nes-physical-operators FrontTspatialTspatialPhysicalFunction.cpp) +add_plugin(LeftTspatialTspatial PhysicalFunction nes-physical-operators LeftTspatialTspatialPhysicalFunction.cpp) +add_plugin(OveraboveTspatialTspatial PhysicalFunction nes-physical-operators OveraboveTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverafterTspatialTspatial PhysicalFunction nes-physical-operators OverafterTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverbackTspatialTspatial PhysicalFunction nes-physical-operators OverbackTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverbeforeTspatialTspatial PhysicalFunction nes-physical-operators OverbeforeTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverbelowTspatialTspatial PhysicalFunction nes-physical-operators OverbelowTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverfrontTspatialTspatial PhysicalFunction nes-physical-operators OverfrontTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverlapsTspatialTspatial PhysicalFunction nes-physical-operators OverlapsTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverleftTspatialTspatial PhysicalFunction nes-physical-operators OverleftTspatialTspatialPhysicalFunction.cpp) +add_plugin(OverrightTspatialTspatial PhysicalFunction nes-physical-operators OverrightTspatialTspatialPhysicalFunction.cpp) +add_plugin(RightTspatialTspatial PhysicalFunction nes-physical-operators RightTspatialTspatialPhysicalFunction.cpp) +add_plugin(SameTspatialTspatial PhysicalFunction nes-physical-operators SameTspatialTspatialPhysicalFunction.cpp) +add_plugin(AdjacentTemporalTemporal PhysicalFunction nes-physical-operators AdjacentTemporalTemporalPhysicalFunction.cpp) +add_plugin(AfterTemporalTemporal PhysicalFunction nes-physical-operators AfterTemporalTemporalPhysicalFunction.cpp) +add_plugin(BeforeTemporalTemporal PhysicalFunction nes-physical-operators BeforeTemporalTemporalPhysicalFunction.cpp) +add_plugin(ContainedTemporalTemporal PhysicalFunction nes-physical-operators ContainedTemporalTemporalPhysicalFunction.cpp) +add_plugin(ContainsTemporalTemporal PhysicalFunction nes-physical-operators ContainsTemporalTemporalPhysicalFunction.cpp) +add_plugin(OverafterTemporalTemporal PhysicalFunction nes-physical-operators OverafterTemporalTemporalPhysicalFunction.cpp) +add_plugin(OverbeforeTemporalTemporal PhysicalFunction nes-physical-operators OverbeforeTemporalTemporalPhysicalFunction.cpp) +add_plugin(OverlapsTemporalTemporal PhysicalFunction nes-physical-operators OverlapsTemporalTemporalPhysicalFunction.cpp) +add_plugin(SameTemporalTemporal PhysicalFunction nes-physical-operators SameTemporalTemporalPhysicalFunction.cpp) +add_plugin(TemporalCmp PhysicalFunction nes-physical-operators TemporalCmpPhysicalFunction.cpp) +add_plugin(TemporalEq PhysicalFunction nes-physical-operators TemporalEqPhysicalFunction.cpp) +add_plugin(TemporalGe PhysicalFunction nes-physical-operators TemporalGePhysicalFunction.cpp) +add_plugin(TemporalGt PhysicalFunction nes-physical-operators TemporalGtPhysicalFunction.cpp) +add_plugin(TemporalLe PhysicalFunction nes-physical-operators TemporalLePhysicalFunction.cpp) +add_plugin(TemporalLt PhysicalFunction nes-physical-operators TemporalLtPhysicalFunction.cpp) +add_plugin(TemporalNe PhysicalFunction nes-physical-operators TemporalNePhysicalFunction.cpp) +add_plugin(AlwaysEqTemporalTemporal PhysicalFunction nes-physical-operators AlwaysEqTemporalTemporalPhysicalFunction.cpp) +add_plugin(AlwaysGeTemporalTemporal PhysicalFunction nes-physical-operators AlwaysGeTemporalTemporalPhysicalFunction.cpp) +add_plugin(AlwaysGtTemporalTemporal PhysicalFunction nes-physical-operators AlwaysGtTemporalTemporalPhysicalFunction.cpp) +add_plugin(AlwaysLeTemporalTemporal PhysicalFunction nes-physical-operators AlwaysLeTemporalTemporalPhysicalFunction.cpp) +add_plugin(AlwaysLtTemporalTemporal PhysicalFunction nes-physical-operators AlwaysLtTemporalTemporalPhysicalFunction.cpp) +add_plugin(AlwaysNeTemporalTemporal PhysicalFunction nes-physical-operators AlwaysNeTemporalTemporalPhysicalFunction.cpp) +add_plugin(EverEqTemporalTemporal PhysicalFunction nes-physical-operators EverEqTemporalTemporalPhysicalFunction.cpp) +add_plugin(EverGeTemporalTemporal PhysicalFunction nes-physical-operators EverGeTemporalTemporalPhysicalFunction.cpp) +add_plugin(EverGtTemporalTemporal PhysicalFunction nes-physical-operators EverGtTemporalTemporalPhysicalFunction.cpp) +add_plugin(EverLeTemporalTemporal PhysicalFunction nes-physical-operators EverLeTemporalTemporalPhysicalFunction.cpp) +add_plugin(EverLtTemporalTemporal PhysicalFunction nes-physical-operators EverLtTemporalTemporalPhysicalFunction.cpp) +add_plugin(EverNeTemporalTemporal PhysicalFunction nes-physical-operators EverNeTemporalTemporalPhysicalFunction.cpp) +add_plugin(TemporalFrechetDistance PhysicalFunction nes-physical-operators TemporalFrechetDistancePhysicalFunction.cpp) +add_plugin(TemporalHausdorffDistance PhysicalFunction nes-physical-operators TemporalHausdorffDistancePhysicalFunction.cpp) +add_plugin(TemporalDyntimewarpDistance PhysicalFunction nes-physical-operators TemporalDyntimewarpDistancePhysicalFunction.cpp) +add_plugin(TemporalNADTGeometry PhysicalFunction nes-physical-operators TemporalNADTGeometryPhysicalFunction.cpp) +add_plugin(TemporalNADTFloat PhysicalFunction nes-physical-operators TemporalNADTFloatPhysicalFunction.cpp) +add_plugin(TemporalNADTInt PhysicalFunction nes-physical-operators TemporalNADTIntPhysicalFunction.cpp) +add_plugin(AlwaysEqTfloatFloat PhysicalFunction nes-physical-operators AlwaysEqTfloatFloatPhysicalFunction.cpp) +add_plugin(AlwaysGeTfloatFloat PhysicalFunction nes-physical-operators AlwaysGeTfloatFloatPhysicalFunction.cpp) +add_plugin(AlwaysGtTfloatFloat PhysicalFunction nes-physical-operators AlwaysGtTfloatFloatPhysicalFunction.cpp) +add_plugin(AlwaysLeTfloatFloat PhysicalFunction nes-physical-operators AlwaysLeTfloatFloatPhysicalFunction.cpp) +add_plugin(AlwaysLtTfloatFloat PhysicalFunction nes-physical-operators AlwaysLtTfloatFloatPhysicalFunction.cpp) +add_plugin(AlwaysNeTfloatFloat PhysicalFunction nes-physical-operators AlwaysNeTfloatFloatPhysicalFunction.cpp) +add_plugin(EverEqTfloatFloat PhysicalFunction nes-physical-operators EverEqTfloatFloatPhysicalFunction.cpp) +add_plugin(EverGeTfloatFloat PhysicalFunction nes-physical-operators EverGeTfloatFloatPhysicalFunction.cpp) +add_plugin(EverGtTfloatFloat PhysicalFunction nes-physical-operators EverGtTfloatFloatPhysicalFunction.cpp) +add_plugin(EverLeTfloatFloat PhysicalFunction nes-physical-operators EverLeTfloatFloatPhysicalFunction.cpp) +add_plugin(EverLtTfloatFloat PhysicalFunction nes-physical-operators EverLtTfloatFloatPhysicalFunction.cpp) +add_plugin(EverNeTfloatFloat PhysicalFunction nes-physical-operators EverNeTfloatFloatPhysicalFunction.cpp) +add_plugin(AlwaysEqTintInt PhysicalFunction nes-physical-operators AlwaysEqTintIntPhysicalFunction.cpp) +add_plugin(AlwaysGeTintInt PhysicalFunction nes-physical-operators AlwaysGeTintIntPhysicalFunction.cpp) +add_plugin(AlwaysGtTintInt PhysicalFunction nes-physical-operators AlwaysGtTintIntPhysicalFunction.cpp) +add_plugin(AlwaysLeTintInt PhysicalFunction nes-physical-operators AlwaysLeTintIntPhysicalFunction.cpp) +add_plugin(AlwaysLtTintInt PhysicalFunction nes-physical-operators AlwaysLtTintIntPhysicalFunction.cpp) +add_plugin(AlwaysNeTintInt PhysicalFunction nes-physical-operators AlwaysNeTintIntPhysicalFunction.cpp) +add_plugin(EverEqTintInt PhysicalFunction nes-physical-operators EverEqTintIntPhysicalFunction.cpp) +add_plugin(EverGeTintInt PhysicalFunction nes-physical-operators EverGeTintIntPhysicalFunction.cpp) +add_plugin(EverGtTintInt PhysicalFunction nes-physical-operators EverGtTintIntPhysicalFunction.cpp) +add_plugin(EverLeTintInt PhysicalFunction nes-physical-operators EverLeTintIntPhysicalFunction.cpp) +add_plugin(EverLtTintInt PhysicalFunction nes-physical-operators EverLtTintIntPhysicalFunction.cpp) +add_plugin(EverNeTintInt PhysicalFunction nes-physical-operators EverNeTintIntPhysicalFunction.cpp) +add_plugin(TemporalNADFloatScalar PhysicalFunction nes-physical-operators TemporalNADFloatScalarPhysicalFunction.cpp) +add_plugin(TemporalNADIntScalar PhysicalFunction nes-physical-operators TemporalNADIntScalarPhysicalFunction.cpp) +add_plugin(AlwaysEqFloatTfloat PhysicalFunction nes-physical-operators AlwaysEqFloatTfloatPhysicalFunction.cpp) +add_plugin(AlwaysGeFloatTfloat PhysicalFunction nes-physical-operators AlwaysGeFloatTfloatPhysicalFunction.cpp) +add_plugin(AlwaysGtFloatTfloat PhysicalFunction nes-physical-operators AlwaysGtFloatTfloatPhysicalFunction.cpp) +add_plugin(AlwaysLeFloatTfloat PhysicalFunction nes-physical-operators AlwaysLeFloatTfloatPhysicalFunction.cpp) +add_plugin(AlwaysLtFloatTfloat PhysicalFunction nes-physical-operators AlwaysLtFloatTfloatPhysicalFunction.cpp) +add_plugin(AlwaysNeFloatTfloat PhysicalFunction nes-physical-operators AlwaysNeFloatTfloatPhysicalFunction.cpp) +add_plugin(EverEqFloatTfloat PhysicalFunction nes-physical-operators EverEqFloatTfloatPhysicalFunction.cpp) +add_plugin(EverGeFloatTfloat PhysicalFunction nes-physical-operators EverGeFloatTfloatPhysicalFunction.cpp) +add_plugin(EverGtFloatTfloat PhysicalFunction nes-physical-operators EverGtFloatTfloatPhysicalFunction.cpp) +add_plugin(EverLeFloatTfloat PhysicalFunction nes-physical-operators EverLeFloatTfloatPhysicalFunction.cpp) +add_plugin(EverLtFloatTfloat PhysicalFunction nes-physical-operators EverLtFloatTfloatPhysicalFunction.cpp) +add_plugin(EverNeFloatTfloat PhysicalFunction nes-physical-operators EverNeFloatTfloatPhysicalFunction.cpp) +add_plugin(AlwaysEqIntTint PhysicalFunction nes-physical-operators AlwaysEqIntTintPhysicalFunction.cpp) +add_plugin(AlwaysGeIntTint PhysicalFunction nes-physical-operators AlwaysGeIntTintPhysicalFunction.cpp) +add_plugin(AlwaysGtIntTint PhysicalFunction nes-physical-operators AlwaysGtIntTintPhysicalFunction.cpp) +add_plugin(AlwaysLeIntTint PhysicalFunction nes-physical-operators AlwaysLeIntTintPhysicalFunction.cpp) +add_plugin(AlwaysLtIntTint PhysicalFunction nes-physical-operators AlwaysLtIntTintPhysicalFunction.cpp) +add_plugin(AlwaysNeIntTint PhysicalFunction nes-physical-operators AlwaysNeIntTintPhysicalFunction.cpp) +add_plugin(EverEqIntTint PhysicalFunction nes-physical-operators EverEqIntTintPhysicalFunction.cpp) +add_plugin(EverGeIntTint PhysicalFunction nes-physical-operators EverGeIntTintPhysicalFunction.cpp) +add_plugin(EverGtIntTint PhysicalFunction nes-physical-operators EverGtIntTintPhysicalFunction.cpp) +add_plugin(EverLeIntTint PhysicalFunction nes-physical-operators EverLeIntTintPhysicalFunction.cpp) +add_plugin(EverLtIntTint PhysicalFunction nes-physical-operators EverLtIntTintPhysicalFunction.cpp) +add_plugin(EverNeIntTint PhysicalFunction nes-physical-operators EverNeIntTintPhysicalFunction.cpp) +add_plugin(MultTnumberTnumber PhysicalFunction nes-physical-operators MultTnumberTnumberPhysicalFunction.cpp) +add_plugin(TcontainsTgeoTgeo PhysicalFunction nes-physical-operators TcontainsTgeoTgeoPhysicalFunction.cpp) +add_plugin(TcoversTgeoTgeo PhysicalFunction nes-physical-operators TcoversTgeoTgeoPhysicalFunction.cpp) +add_plugin(TdistanceTgeoTgeo PhysicalFunction nes-physical-operators TdistanceTgeoTgeoPhysicalFunction.cpp) +add_plugin(TcontainsTcbufferTcbuffer PhysicalFunction nes-physical-operators TcontainsTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(TcoversTcbufferTcbuffer PhysicalFunction nes-physical-operators TcoversTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(TdistanceTcbufferTcbuffer PhysicalFunction nes-physical-operators TdistanceTcbufferTcbufferPhysicalFunction.cpp) +add_plugin(TdistanceTnpointTnpoint PhysicalFunction nes-physical-operators TdistanceTnpointTnpointPhysicalFunction.cpp) +add_plugin(TdistanceTposeTpose PhysicalFunction nes-physical-operators TdistanceTposeTposePhysicalFunction.cpp) +add_plugin(TpointLengthWkb PhysicalFunction nes-physical-operators TpointLengthWkbPhysicalFunction.cpp) +add_plugin(TnpointLength PhysicalFunction nes-physical-operators TnpointLengthPhysicalFunction.cpp) +add_plugin(TcbufferToTfloat PhysicalFunction nes-physical-operators TcbufferToTfloatPhysicalFunction.cpp) +add_plugin(NadTcbufferStbox PhysicalFunction nes-physical-operators NadTcbufferStboxPhysicalFunction.cpp) +add_plugin(NadTnpointStbox PhysicalFunction nes-physical-operators NadTnpointStboxPhysicalFunction.cpp) +add_plugin(NadTposeStbox PhysicalFunction nes-physical-operators NadTposeStboxPhysicalFunction.cpp) +add_plugin(AtouchesTpointGeo PhysicalFunction nes-physical-operators AtouchesTpointGeoPhysicalFunction.cpp) +add_plugin(EtouchesTpointGeo PhysicalFunction nes-physical-operators EtouchesTpointGeoPhysicalFunction.cpp) +add_plugin(TemporalAContainsGeometry PhysicalFunction nes-physical-operators TemporalAContainsGeometryPhysicalFunction.cpp) +add_plugin(TemporalADisjointGeometry PhysicalFunction nes-physical-operators TemporalADisjointGeometryPhysicalFunction.cpp) +add_plugin(TemporalATouchesGeometry PhysicalFunction nes-physical-operators TemporalATouchesGeometryPhysicalFunction.cpp) +add_plugin(TemporalECoversGeometry PhysicalFunction nes-physical-operators TemporalECoversGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDisjointGeometry PhysicalFunction nes-physical-operators TemporalEDisjointGeometryPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsGeometry PhysicalFunction nes-physical-operators TemporalEIntersectsGeometryPhysicalFunction.cpp) +add_plugin(TemporalETouchesGeometry PhysicalFunction nes-physical-operators TemporalETouchesGeometryPhysicalFunction.cpp) +add_plugin(TemporalAtGeometry PhysicalFunction nes-physical-operators TemporalAtGeometryPhysicalFunction.cpp) +add_plugin(TemporalMinusGeometry PhysicalFunction nes-physical-operators TemporalMinusGeometryPhysicalFunction.cpp) +add_plugin(TemporalADWithinGeometry PhysicalFunction nes-physical-operators TemporalADWithinGeometryPhysicalFunction.cpp) +add_plugin(TemporalADWithinTGeometry PhysicalFunction nes-physical-operators TemporalADWithinTGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTGeometry PhysicalFunction nes-physical-operators TemporalEDWithinTGeometryPhysicalFunction.cpp) +add_plugin(TemporalAContainsTGeometry PhysicalFunction nes-physical-operators TemporalAContainsTGeometryPhysicalFunction.cpp) +add_plugin(TemporalADisjointTGeometry PhysicalFunction nes-physical-operators TemporalADisjointTGeometryPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTGeometry PhysicalFunction nes-physical-operators TemporalAIntersectsTGeometryPhysicalFunction.cpp) +add_plugin(TemporalATouchesTGeometry PhysicalFunction nes-physical-operators TemporalATouchesTGeometryPhysicalFunction.cpp) +add_plugin(TemporalEContainsTGeometry PhysicalFunction nes-physical-operators TemporalEContainsTGeometryPhysicalFunction.cpp) +add_plugin(TemporalECoversTGeometry PhysicalFunction nes-physical-operators TemporalECoversTGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDisjointTGeometry PhysicalFunction nes-physical-operators TemporalEDisjointTGeometryPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTGeometry PhysicalFunction nes-physical-operators TemporalEIntersectsTGeometryPhysicalFunction.cpp) +add_plugin(TemporalETouchesTGeometry PhysicalFunction nes-physical-operators TemporalETouchesTGeometryPhysicalFunction.cpp) +add_plugin(TemporalNADGeometry PhysicalFunction nes-physical-operators TemporalNADGeometryPhysicalFunction.cpp) +add_plugin(TemporalAContainsTCbuffer PhysicalFunction nes-physical-operators TemporalAContainsTCbufferPhysicalFunction.cpp) +add_plugin(TemporalACoversTCbuffer PhysicalFunction nes-physical-operators TemporalACoversTCbufferPhysicalFunction.cpp) +add_plugin(TemporalADisjointTCbuffer PhysicalFunction nes-physical-operators TemporalADisjointTCbufferPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTCbuffer PhysicalFunction nes-physical-operators TemporalAIntersectsTCbufferPhysicalFunction.cpp) +add_plugin(TemporalATouchesTCbuffer PhysicalFunction nes-physical-operators TemporalATouchesTCbufferPhysicalFunction.cpp) +add_plugin(TemporalEContainsTCbuffer PhysicalFunction nes-physical-operators TemporalEContainsTCbufferPhysicalFunction.cpp) +add_plugin(TemporalECoversTCbuffer PhysicalFunction nes-physical-operators TemporalECoversTCbufferPhysicalFunction.cpp) +add_plugin(TemporalEDisjointTCbuffer PhysicalFunction nes-physical-operators TemporalEDisjointTCbufferPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTCbuffer PhysicalFunction nes-physical-operators TemporalEIntersectsTCbufferPhysicalFunction.cpp) +add_plugin(TemporalETouchesTCbuffer PhysicalFunction nes-physical-operators TemporalETouchesTCbufferPhysicalFunction.cpp) +add_plugin(TemporalNADTCbuffer PhysicalFunction nes-physical-operators TemporalNADTCbufferPhysicalFunction.cpp) +add_plugin(TemporalADWithinTCbufferGeometry PhysicalFunction nes-physical-operators TemporalADWithinTCbufferGeometryPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTCbufferGeometry PhysicalFunction nes-physical-operators TemporalEDWithinTCbufferGeometryPhysicalFunction.cpp) +add_plugin(AlwaysEqTcbufferCbuffer PhysicalFunction nes-physical-operators AlwaysEqTcbufferCbufferPhysicalFunction.cpp) +add_plugin(AlwaysNeTcbufferCbuffer PhysicalFunction nes-physical-operators AlwaysNeTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EverEqTcbufferCbuffer PhysicalFunction nes-physical-operators EverEqTcbufferCbufferPhysicalFunction.cpp) +add_plugin(EverNeTcbufferCbuffer PhysicalFunction nes-physical-operators EverNeTcbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalAContainsTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalAContainsTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalACoversTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalACoversTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalADisjointTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalADisjointTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalAIntersectsTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalATouchesTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalATouchesTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalEContainsTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalEContainsTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalECoversTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalECoversTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalEDisjointTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalEDisjointTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalEIntersectsTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalETouchesTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalETouchesTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalNADTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalNADTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalADWithinTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalADWithinTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTCbufferCbuffer PhysicalFunction nes-physical-operators TemporalEDWithinTCbufferCbufferPhysicalFunction.cpp) +add_plugin(TemporalADisjointTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalADisjointTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalAIntersectsTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalAIntersectsTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalATouchesTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalATouchesTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalECoversTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalECoversTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalNADTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalNADTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalADWithinTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalADWithinTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalEDWithinTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalEDWithinTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalEIntersectsTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalEIntersectsTCbufferTCbufferPhysicalFunction.cpp) +add_plugin(TemporalETouchesTCbufferTCbuffer PhysicalFunction nes-physical-operators TemporalETouchesTCbufferTCbufferPhysicalFunction.cpp) endif() diff --git a/nes-physical-operators/src/Functions/Meos/ContainedFloatSpanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedFloatSpanPhysicalFunction.cpp new file mode 100644 index 0000000000..cc7808c192 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedFloatSpanPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainedFloatSpanPhysicalFunction::ContainedFloatSpanPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction spFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal ContainedFloatSpanPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto sp = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](double arg0, + const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = contained_float_span(arg0, temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedFloatSpanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainedFloatSpanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainedFloatSpanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.cpp new file mode 100644 index 0000000000..f3c6a39e0e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedFloatspanSpanPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainedFloatspanSpanPhysicalFunction::ContainedFloatspanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(spFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedFloatspanSpanPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + Span* arg0B = floatspan_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = contained_span_span(temp, sp0); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedFloatspanSpanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainedFloatspanSpanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainedFloatspanSpanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedIntSpanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedIntSpanPhysicalFunction.cpp new file mode 100644 index 0000000000..14300ca3d1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedIntSpanPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainedIntSpanPhysicalFunction::ContainedIntSpanPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction spFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal ContainedIntSpanPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto sp = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](double arg0, + const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = contained_int_span((int)arg0, temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedIntSpanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainedIntSpanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainedIntSpanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedSpanSpanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedSpanSpanPhysicalFunction.cpp new file mode 100644 index 0000000000..13659a794e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedSpanSpanPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainedSpanSpanPhysicalFunction::ContainedSpanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(spFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedSpanSpanPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + Span* arg0B = intspan_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = contained_span_span(temp, sp0); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedSpanSpanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainedSpanSpanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainedSpanSpanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..0783450ddf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedStboxStboxPhysicalFunction::ContainedStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contained_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainedStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainedStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..a596d6347a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedStboxTspatialPhysicalFunction::ContainedStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contained_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "ContainedStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return ContainedStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..77235a1050 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedTboxTnumberPhysicalFunction::ContainedTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contained_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "ContainedTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return ContainedTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..c105fb6dec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedTemporalTemporalPhysicalFunction::ContainedTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal ContainedTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return contained_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "ContainedTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return ContainedTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..5dee8c7806 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedTnumberTboxPhysicalFunction::ContainedTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contained_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "ContainedTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return ContainedTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..7fca41c3c9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedTnumberTnumberPhysicalFunction::ContainedTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = contained_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainedTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainedTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..3bfffaffd0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedTspatialStboxPhysicalFunction::ContainedTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainedTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contained_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "ContainedTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return ContainedTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..a42f8de814 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainedTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainedTspatialTspatialPhysicalFunction::ContainedTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal ContainedTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return contained_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainedTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "ContainedTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return ContainedTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.cpp new file mode 100644 index 0000000000..062460e21d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsFloatspanSpanPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainsFloatspanSpanPhysicalFunction::ContainsFloatspanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(spFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsFloatspanSpanPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + Span* arg0B = floatspan_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = contains_span_span(temp, sp0); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsFloatspanSpanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainsFloatspanSpanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainsFloatspanSpanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsSpanFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsSpanFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..8c8ab7ef81 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsSpanFloatPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainsSpanFloatPhysicalFunction::ContainsSpanFloatPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(spFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsSpanFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = contains_span_float(temp, arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize(), arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsSpanFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainsSpanFloatPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainsSpanFloatPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsSpanIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsSpanIntPhysicalFunction.cpp new file mode 100644 index 0000000000..6cfd651a14 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsSpanIntPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainsSpanIntPhysicalFunction::ContainsSpanIntPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(spFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsSpanIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = contains_span_int(temp, (int)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize(), arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsSpanIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainsSpanIntPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainsSpanIntPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsSpanSpanPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsSpanSpanPhysicalFunction.cpp new file mode 100644 index 0000000000..535fa4d5be --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsSpanSpanPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +ContainsSpanSpanPhysicalFunction::ContainsSpanSpanPhysicalFunction(PhysicalFunction spFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(spFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsSpanSpanPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + Span* arg0B = intspan_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = contains_span_span(temp, sp0); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsSpanSpanPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainsSpanSpanPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainsSpanSpanPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..577eb4bd3e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsStboxStboxPhysicalFunction::ContainsStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contains_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainsStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainsStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..4a6c891c96 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsStboxTspatialPhysicalFunction::ContainsStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contains_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "ContainsStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return ContainsStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..09f68418e4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsTboxTnumberPhysicalFunction::ContainsTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contains_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "ContainsTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return ContainsTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..ed97a7235e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsTemporalTemporalPhysicalFunction::ContainsTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal ContainsTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return contains_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "ContainsTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return ContainsTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..d447805125 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsTnumberTboxPhysicalFunction::ContainsTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contains_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "ContainsTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return ContainsTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..90af9fbad2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsTnumberTnumberPhysicalFunction::ContainsTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = contains_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "ContainsTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return ContainsTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..839aaf1387 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsTspatialStboxPhysicalFunction::ContainsTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal ContainsTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = contains_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "ContainsTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return ContainsTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..7530bac255 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/ContainsTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +ContainsTspatialTspatialPhysicalFunction::ContainsTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal ContainsTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return contains_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterContainsTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "ContainsTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return ContainsTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..81e81d439c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivBigintTbigintPhysicalFunction::DivBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal DivBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = div_bigint_tbigint(static_cast(arg0), temp); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "DivBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return DivBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..862fc5a5fe --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivFloatTfloatPhysicalFunction::DivFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal DivFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = div_float_tfloat(arg0, temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "DivFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return DivFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..3e95541334 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivIntTintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivIntTintPhysicalFunction::DivIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal DivIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t arg0, + int32_t value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = div_int_tint(arg0, temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "DivIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return DivIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..d3cde73b7c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivTbigintBigintPhysicalFunction::DivTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal DivTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = div_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "DivTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return DivTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..14b7e4bb59 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivTfloatFloatPhysicalFunction::DivTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal DivTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = div_tfloat_float(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "DivTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return DivTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..9f1d6ac4cc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivTintIntPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivTintIntPhysicalFunction::DivTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal DivTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = div_tint_int(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "DivTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return DivTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/DivTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/DivTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..dfd8a3d1ea --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/DivTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +DivTnumberTnumberPhysicalFunction::DivTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal DivTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = div_tnumber_tnumber(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterDivTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "DivTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return DivTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..b8d3f1f339 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcontainsGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EcontainsGeoTrgeometryPhysicalFunction::EcontainsGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1) { + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); +} + +VarVal EcontainsGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto tgt_wkt = paramFns[0].execute(record, arena).cast(); + auto ref_wkt = paramFns[1].execute(record, arena).cast(); + auto x1 = paramFns[2].execute(record, arena).cast(); + auto y1 = paramFns[3].execute(record, arena).cast(); + auto theta1 = paramFns[4].execute(record, arena).cast(); + auto ts1 = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_wktsz, const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = econtains_geo_trgeometry(gs_tgt, (Temporal*)inst1); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x1, y1, theta1, ts1); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcontainsGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "EcontainsGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EcontainsGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..288f9cc3a3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcontainsTcbufferGeoPhysicalFunction::EcontainsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EcontainsTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = econtains_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcontainsTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EcontainsTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EcontainsTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..b934371697 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcontainsTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcontainsTcbufferTcbufferPhysicalFunction::EcontainsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EcontainsTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = econtains_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcontainsTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EcontainsTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EcontainsTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a6ccc5a532 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcontainsTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcontainsTgeoGeoPhysicalFunction::EcontainsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EcontainsTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return econtains_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcontainsTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EcontainsTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EcontainsTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..8f3fc541fb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcontainsTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcontainsTgeoTgeoPhysicalFunction::EcontainsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EcontainsTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return econtains_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcontainsTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EcontainsTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EcontainsTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..2f7eebcbfa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EcoversGeoTrgeometryPhysicalFunction::EcoversGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1) { + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); +} + +VarVal EcoversGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto tgt_wkt = paramFns[0].execute(record, arena).cast(); + auto ref_wkt = paramFns[1].execute(record, arena).cast(); + auto x1 = paramFns[2].execute(record, arena).cast(); + auto y1 = paramFns[3].execute(record, arena).cast(); + auto theta1 = paramFns[4].execute(record, arena).cast(); + auto ts1 = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_wktsz, const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = ecovers_geo_trgeometry(gs_tgt, (Temporal*)inst1); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x1, y1, theta1, ts1); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcoversGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "EcoversGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EcoversGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..2071c9cf99 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcoversTcbufferGeoPhysicalFunction::EcoversTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EcoversTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = ecovers_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcoversTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EcoversTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EcoversTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..b00bb5025a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcoversTcbufferTcbufferPhysicalFunction::EcoversTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EcoversTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = ecovers_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcoversTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EcoversTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EcoversTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcoversTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..75eddcdbc7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcoversTgeoGeoPhysicalFunction::EcoversTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EcoversTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return ecovers_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcoversTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EcoversTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EcoversTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..8ef0298018 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EcoversTgeoTgeoPhysicalFunction::EcoversTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EcoversTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ecovers_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcoversTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EcoversTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EcoversTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..c1e7089166 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EcoversTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EcoversTrgeometryGeoPhysicalFunction::EcoversTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal EcoversTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = ecovers_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEcoversTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "EcoversTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EcoversTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..3ef325e1fa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdisjointTcbufferGeoPhysicalFunction::EdisjointTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EdisjointTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = edisjoint_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdisjointTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EdisjointTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EdisjointTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..aac64482f5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdisjointTcbufferTcbufferPhysicalFunction::EdisjointTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EdisjointTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = edisjoint_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdisjointTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EdisjointTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EdisjointTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..38fa375872 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdisjointTgeoGeoPhysicalFunction::EdisjointTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EdisjointTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return edisjoint_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdisjointTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EdisjointTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EdisjointTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..b24c7ec93c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdisjointTgeoTgeoPhysicalFunction::EdisjointTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EdisjointTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return edisjoint_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdisjointTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EdisjointTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EdisjointTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..5622a76fbd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EdisjointTrgeometryGeoPhysicalFunction::EdisjointTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal EdisjointTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = edisjoint_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdisjointTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "EdisjointTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EdisjointTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..1fede355b0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdisjointTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EdisjointTrgeometryTrgeometryPhysicalFunction::EdisjointTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) { + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal EdisjointTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref1_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena).cast(); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref1_wktsz + 1); + memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* ref2_str = (char*)malloc(ref2_wktsz + 1); + memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\0'; + GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str); + if (!gref2) return 0.0; + Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!pose2) { free(gref2); return 0.0; } + TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2); + free(gref2); free(pose2); + if (!inst2) { free(inst1); return 0.0; } + int r = edisjoint_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdisjointTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==10, + "EdisjointTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return EdisjointTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..c975864d2a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdwithinTcbufferCbufferPhysicalFunction::EdwithinTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal EdwithinTcbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* cbufLitPtr, uint32_t cbufLitSize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = edwithin_tcbuffer_cbuffer(tcbuffer, cb, distValue); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EdwithinTcbufferCbufferPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EdwithinTcbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..ae1d8cd124 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdwithinTcbufferGeoPhysicalFunction::EdwithinTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal EdwithinTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = edwithin_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry(), distValue); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EdwithinTcbufferGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EdwithinTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..eee32842d1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,132 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdwithinTcbufferTcbufferPhysicalFunction::EdwithinTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal EdwithinTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = edwithin_tcbuffer_tcbuffer(tA, tB, distValue); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "EdwithinTcbufferTcbufferPhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return EdwithinTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a947348670 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdwithinTgeoGeoPhysicalFunction::EdwithinTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal EdwithinTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS *_tgeo_geo with trailing distance arg + // — int fn(const Temporal*, const GSERIALIZED*, double). + return edwithin_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EdwithinTgeoGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EdwithinTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..91e3ecf7e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EdwithinTgeoTgeoPhysicalFunction::EdwithinTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal EdwithinTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo with trailing distance arg + // — int fn(const Temporal*, const Temporal*, double). + return edwithin_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "EdwithinTgeoTgeoPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return EdwithinTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..b10616f19d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EdwithinTrgeometryGeoPhysicalFunction::EdwithinTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt, PhysicalFunction dist) { + paramFns.reserve(7); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(dist)); +} + +VarVal EdwithinTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + auto dist = paramFns[6].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz, double dist) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = edwithin_trgeometry_geo((Temporal*)inst1, gs_tgt, dist); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt, dist); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==7, + "EdwithinTrgeometryGeoPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + return EdwithinTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..6c5ddc2ffa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EdwithinTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EdwithinTrgeometryTrgeometryPhysicalFunction::EdwithinTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2, PhysicalFunction dist) { + paramFns.reserve(11); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); + paramFns.push_back(std::move(dist)); +} + +VarVal EdwithinTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref1_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena).cast(); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + auto dist = paramFns[10].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2, double dist) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref1_wktsz + 1); + memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* ref2_str = (char*)malloc(ref2_wktsz + 1); + memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\0'; + GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str); + if (!gref2) return 0.0; + Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!pose2) { free(gref2); return 0.0; } + TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2); + free(gref2); free(pose2); + if (!inst2) { free(inst1); return 0.0; } + int r = edwithin_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2, dist); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2, dist); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEdwithinTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==11, + "EdwithinTrgeometryTrgeometryPhysicalFunction requires 11 children but got {}", + arguments.childFunctions.size()); + return EdwithinTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9]), + std::move(arguments.childFunctions[10])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..3ae7ba1ec3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EintersectsTcbufferGeoPhysicalFunction::EintersectsTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EintersectsTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = eintersects_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EintersectsTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EintersectsTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..c9089bd5a6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EintersectsTcbufferTcbufferPhysicalFunction::EintersectsTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EintersectsTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = eintersects_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EintersectsTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EintersectsTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..c6a0ce3d7b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EintersectsTgeoGeoPhysicalFunction::EintersectsTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EintersectsTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return eintersects_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EintersectsTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EintersectsTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..084439fd05 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EintersectsTgeoTgeoPhysicalFunction::EintersectsTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EintersectsTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return eintersects_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EintersectsTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EintersectsTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..30afdf09db --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EintersectsTrgeometryGeoPhysicalFunction::EintersectsTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal EintersectsTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = eintersects_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "EintersectsTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EintersectsTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..5147d20668 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EintersectsTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EintersectsTrgeometryTrgeometryPhysicalFunction::EintersectsTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) { + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal EintersectsTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref1_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena).cast(); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_wktsz, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref1_wktsz + 1); + memcpy(ref1_str, ref1_wkt, ref1_wktsz); ref1_str[ref1_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* ref2_str = (char*)malloc(ref2_wktsz + 1); + memcpy(ref2_str, ref2_wkt, ref2_wktsz); ref2_str[ref2_wktsz] = '\0'; + GSERIALIZED* gref2 = geom_in(ref2_str, -1); free(ref2_str); + if (!gref2) return 0.0; + Pose* pose2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!pose2) { free(gref2); return 0.0; } + TInstant* inst2 = trgeometryinst_make(gref2, pose2, (TimestampTz)ts2); + free(gref2); free(pose2); + if (!inst2) { free(inst1); return 0.0; } + int r = eintersects_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEintersectsTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==10, + "EintersectsTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return EintersectsTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..2271289bf2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EtouchesTcbufferGeoPhysicalFunction::EtouchesTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EtouchesTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = etouches_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEtouchesTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EtouchesTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EtouchesTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..262642b94a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EtouchesTcbufferTcbufferPhysicalFunction::EtouchesTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EtouchesTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = etouches_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEtouchesTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EtouchesTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EtouchesTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..059d3c36d4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EtouchesTgeoGeoPhysicalFunction::EtouchesTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EtouchesTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return etouches_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEtouchesTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EtouchesTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EtouchesTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..e371f5d717 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EtouchesTgeoTgeoPhysicalFunction::EtouchesTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EtouchesTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return etouches_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEtouchesTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EtouchesTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EtouchesTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EtouchesTpointGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTpointGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..6cf77f2ec9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTpointGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EtouchesTpointGeoPhysicalFunction::EtouchesTpointGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EtouchesTpointGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return etouches_tpoint_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEtouchesTpointGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EtouchesTpointGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EtouchesTpointGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..6bb5e3ba5d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EtouchesTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EtouchesTrgeometryGeoPhysicalFunction::EtouchesTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction tgt_wkt) { + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal EtouchesTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { + auto ref_wkt = paramFns[0].execute(record, arena).cast(); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_wktsz, double x1, double y1, double theta1, uint64_t ts1, const char* tgt_wkt, uint32_t tgt_wktsz) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref1_str = (char*)malloc(ref_wktsz + 1); + memcpy(ref1_str, ref_wkt, ref_wktsz); ref1_str[ref_wktsz] = '\0'; + GSERIALIZED* gref1 = geom_in(ref1_str, -1); free(ref1_str); + if (!gref1) return 0.0; + Pose* pose1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!pose1) { free(gref1); return 0.0; } + TInstant* inst1 = trgeometryinst_make(gref1, pose1, (TimestampTz)ts1); + free(gref1); free(pose1); + if (!inst1) return 0.0; + char* tgt_str = (char*)malloc(tgt_wktsz + 1); + memcpy(tgt_str, tgt_wkt, tgt_wktsz); tgt_str[tgt_wktsz] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst1); return 0.0; } + int r = etouches_trgeometry_geo((Temporal*)inst1, gs_tgt); + free(inst1); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x1, y1, theta1, ts1, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEtouchesTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size()==6, + "EtouchesTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EtouchesTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..26b13bbdcd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqBigintTbigintPhysicalFunction::EverEqBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_eq_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..ffcf426ecd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqBoolTboolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqBoolTboolPhysicalFunction::EverEqBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_eq_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..059678a584 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqFloatTfloatPhysicalFunction::EverEqFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_eq_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..bfc538e63e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EverEqGeoTrgeometryPhysicalFunction::EverEqGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); +} + +VarVal EverEqGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto tgt_wkt = paramFns[0].execute(record, arena); + auto ref_wkt = paramFns[1].execute(record, arena); + auto x = paramFns[2].execute(record, arena).cast(); + auto y = paramFns[3].execute(record, arena).cast(); + auto theta = paramFns[4].execute(record, arena).cast(); + auto ts = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_len, const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) return 0.0; + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) { free(gs_tgt); return 0.0; } + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_tgt); free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) { free(gs_tgt); return 0.0; } + int r = ever_eq_geo_trgeometry(gs_tgt, (Temporal*)inst); + free(gs_tgt); free(inst); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x, y, theta, ts); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverEqGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EverEqGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..33cbb61d35 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqIntTintPhysicalFunction::EverEqIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_eq_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqNpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqNpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..1e437c04dd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqNpointTnpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqNpointTnpointPhysicalFunction::EverEqNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqNpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid0 = parameterValues[0].cast>(); + auto frac0 = parameterValues[1].cast>(); + auto rid = parameterValues[2].cast>(); + auto frac = parameterValues[3].cast>(); + auto ts = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t rid0, + double frac0, + int64_t rid, + double frac, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = ever_eq_npoint_tnpoint(np0, temp); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid0, frac0, rid, frac, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqNpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EverEqNpointTnpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EverEqNpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqPoseTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqPoseTposePhysicalFunction.cpp new file mode 100644 index 0000000000..6a5afbf85d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqPoseTposePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqPoseTposePhysicalFunction::EverEqPoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqPoseTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto px0 = parameterValues[0].cast>(); + auto py0 = parameterValues[1].cast>(); + auto ptheta0 = parameterValues[2].cast>(); + auto x = parameterValues[3].cast>(); + auto y = parameterValues[4].cast>(); + auto theta = parameterValues[5].cast>(); + auto ts = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double px0, + double py0, + double ptheta0, + double x, + double y, + double theta, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = ever_eq_pose_tpose(pose0, temp); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + px0, py0, ptheta0, x, y, theta, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqPoseTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "EverEqPoseTposePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return EverEqPoseTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..5f64f6a0bb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTbigintBigintPhysicalFunction::EverEqTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverEqTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_eq_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..4d07abb020 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTboolBoolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTboolBoolPhysicalFunction::EverEqTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverEqTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_eq_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..f3fbc8b271 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTcbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTcbufferCbufferPhysicalFunction::EverEqTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal EverEqTcbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = ever_eq_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EverEqTcbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EverEqTcbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..be5f58b771 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTcbufferTcbufferPhysicalFunction::EverEqTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverEqTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = ever_eq_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EverEqTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EverEqTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..e35d0f7f40 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTemporalTemporalPhysicalFunction::EverEqTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverEqTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_eq_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverEqTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverEqTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..07275d18f0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverEqTextTtextPhysicalFunction::EverEqTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_eq_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..ce885af5ac --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTfloatFloatPhysicalFunction::EverEqTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_eq_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..f5dfa1f28c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTgeoGeoPhysicalFunction::EverEqTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EverEqTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return ever_eq_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EverEqTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EverEqTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..f452b50fd3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTgeoTgeoPhysicalFunction::EverEqTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverEqTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_eq_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverEqTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverEqTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.cpp new file mode 100644 index 0000000000..b75429bb4a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTh3indexH3indexPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTh3indexH3indexPhysicalFunction::EverEqTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverEqTh3indexH3indexPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = ever_eq_th3index_h3index(temp, (H3Index)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTh3indexH3indexPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTh3indexH3indexPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTh3indexH3indexPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..d4ed27400b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTintIntPhysicalFunction::EverEqTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverEqTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_eq_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..919d64afbb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTjsonbJsonbPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTjsonbJsonbPhysicalFunction::EverEqTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverEqTjsonbJsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = ever_eq_tjsonb_jsonb(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTjsonbJsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTjsonbJsonbPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTjsonbJsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..327c282b11 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTjsonbTjsonbPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTjsonbTjsonbPhysicalFunction::EverEqTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(json0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal EverEqTjsonbTjsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto json0 = parameterValues[2].cast(); + auto ts0 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* json0Ptr, uint32_t json0Size, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string json0S(json0Ptr, json0Size); + Jsonb* jb0 = jsonb_in(json0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tjsonbinst_make(jb0, (TimestampTz)ts0); + free(jb0); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_eq_tjsonb_tjsonb(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, json0.getContent(), json0.getContentSize(), ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTjsonbTjsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EverEqTjsonbTjsonbPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EverEqTjsonbTjsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTnpointNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTnpointNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..93f799f876 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTnpointNpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTnpointNpointPhysicalFunction::EverEqTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); +} + +VarVal EverEqTnpointNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = ever_eq_tnpoint_npoint(temp, np0); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTnpointNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EverEqTnpointNpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EverEqTnpointNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..591b754822 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTnpointTnpointPhysicalFunction.cpp @@ -0,0 +1,120 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTnpointTnpointPhysicalFunction::EverEqTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal EverEqTnpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + auto ts0 = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tnpointinst_make(np0, (TimestampTz)ts0); + free(np0); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_eq_tnpoint_tnpoint(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTnpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverEqTnpointTnpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverEqTnpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTposePosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTposePosePhysicalFunction.cpp new file mode 100644 index 0000000000..cf3d6a4d31 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTposePosePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTposePosePhysicalFunction::EverEqTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); +} + +VarVal EverEqTposePosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = ever_eq_tpose_pose(temp, pose0); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTposePosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "EverEqTposePosePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return EverEqTposePosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTposeTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTposeTposePhysicalFunction.cpp new file mode 100644 index 0000000000..03dac3827a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTposeTposePhysicalFunction.cpp @@ -0,0 +1,129 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTposeTposePhysicalFunction::EverEqTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal EverEqTposeTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + auto ts0 = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0A = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0A) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tposeinst_make(pose0A, (TimestampTz)ts0); + free(pose0A); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_eq_tpose_tpose(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTposeTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EverEqTposeTposePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EverEqTposeTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..7be40fd02e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTquadbinQuadbinPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverEqTquadbinQuadbinPhysicalFunction::EverEqTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverEqTquadbinQuadbinPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = ever_eq_tquadbin_quadbin(temp, (Quadbin)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTquadbinQuadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTquadbinQuadbinPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTquadbinQuadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..75a87fa847 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EverEqTrgeometryGeoPhysicalFunction::EverEqTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal EverEqTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref_wkt = paramFns[0].execute(record, arena); + auto x = paramFns[1].execute(record, arena).cast(); + auto y = paramFns[2].execute(record, arena).cast(); + auto theta = paramFns[3].execute(record, arena).cast(); + auto ts = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) return 0.0; + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) return 0.0; + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst); return 0.0; } + int r = ever_eq_trgeometry_geo((Temporal*)inst, gs_tgt); + free(inst); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x, y, theta, ts, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverEqTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EverEqTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..aeec1c43fd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,115 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EverEqTrgeometryTrgeometryPhysicalFunction::EverEqTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) +{ + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal EverEqTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref1_wkt = paramFns[0].execute(record, arena); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* s1 = (char*)malloc(ref1_len + 1); + memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\0'; + GSERIALIZED* gs1 = geom_in(s1, -1); free(s1); + if (!gs1) return 0.0; + Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!p1) { free(gs1); return 0.0; } + TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1); + free(gs1); free(p1); + if (!inst1) return 0.0; + char* s2 = (char*)malloc(ref2_len + 1); + memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\0'; + GSERIALIZED* gs2 = geom_in(s2, -1); free(s2); + if (!gs2) { free(inst1); return 0.0; } + Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!p2) { free(inst1); free(gs2); return 0.0; } + TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2); + free(gs2); free(p2); + if (!inst2) { free(inst1); return 0.0; } + int r = ever_eq_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 10, + "EverEqTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return EverEqTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverEqTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverEqTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..8a1170dcd5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverEqTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverEqTtextTextPhysicalFunction::EverEqTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverEqTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_eq_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverEqTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverEqTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverEqTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..b5efb7374e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeBigintTbigintPhysicalFunction::EverGeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGeBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_ge_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..cfc844d0e2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeFloatTfloatPhysicalFunction::EverGeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGeFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_ge_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..632e3f3762 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeIntTintPhysicalFunction::EverGeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGeIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_ge_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..6b357f066a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeTbigintBigintPhysicalFunction::EverGeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverGeTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_ge_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..1883997e41 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeTemporalTemporalPhysicalFunction::EverGeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverGeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_ge_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverGeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverGeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..b083e83bc3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverGeTextTtextPhysicalFunction::EverGeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_ge_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..9b62c32ad9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeTfloatFloatPhysicalFunction::EverGeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGeTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_ge_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..faa0e5e040 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGeTintIntPhysicalFunction::EverGeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGeTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_ge_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..969b5c94b8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverGeTtextTextPhysicalFunction::EverGeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverGeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_ge_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..eba2b10aee --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtBigintTbigintPhysicalFunction::EverGtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGtBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_gt_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..af43adc223 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtFloatTfloatPhysicalFunction::EverGtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGtFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_gt_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..59dcdc5a90 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtIntTintPhysicalFunction::EverGtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGtIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_gt_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..38874203a2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtTbigintBigintPhysicalFunction::EverGtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverGtTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_gt_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..4497e1b72f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtTemporalTemporalPhysicalFunction::EverGtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverGtTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_gt_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverGtTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverGtTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..9b28280e3d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverGtTextTtextPhysicalFunction::EverGtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGtTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_gt_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..a52815c810 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtTfloatFloatPhysicalFunction::EverGtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGtTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_gt_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..dbb46735c4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverGtTintIntPhysicalFunction::EverGtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverGtTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_gt_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverGtTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverGtTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..8c2bad3e43 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverGtTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverGtTtextTextPhysicalFunction::EverGtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverGtTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_gt_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverGtTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverGtTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverGtTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..6b65d7e689 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeBigintTbigintPhysicalFunction::EverLeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLeBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_le_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..e645c5fad0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeFloatTfloatPhysicalFunction::EverLeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLeFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_le_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..3c846f7dbb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeIntTintPhysicalFunction::EverLeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLeIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_le_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..b378927048 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeTbigintBigintPhysicalFunction::EverLeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverLeTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_le_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..88654e3a9f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeTemporalTemporalPhysicalFunction::EverLeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverLeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_le_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverLeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverLeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..b7c80259d2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverLeTextTtextPhysicalFunction::EverLeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_le_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..efaa5df05f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeTfloatFloatPhysicalFunction::EverLeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLeTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_le_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..a98fbb2bfe --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLeTintIntPhysicalFunction::EverLeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLeTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_le_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..3c6d5d29d4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverLeTtextTextPhysicalFunction::EverLeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverLeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_le_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..c004ac853b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtBigintTbigintPhysicalFunction::EverLtBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLtBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_lt_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..73a87c2c69 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtFloatTfloatPhysicalFunction::EverLtFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLtFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_lt_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..dfe1d16a2e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtIntTintPhysicalFunction::EverLtIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLtIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_lt_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..0b8d622939 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtTbigintBigintPhysicalFunction::EverLtTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverLtTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_lt_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..b3eefcd69c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtTemporalTemporalPhysicalFunction::EverLtTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverLtTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_lt_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverLtTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverLtTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..71cf357f15 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverLtTextTtextPhysicalFunction::EverLtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLtTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_lt_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..7c07a99884 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtTfloatFloatPhysicalFunction::EverLtTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLtTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_lt_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..9c3707d5bc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverLtTintIntPhysicalFunction::EverLtTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverLtTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_lt_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverLtTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverLtTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..becb395ea2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverLtTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverLtTtextTextPhysicalFunction::EverLtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverLtTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_lt_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverLtTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverLtTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverLtTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..4398019eff --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeBigintTbigintPhysicalFunction::EverNeBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_ne_bigint_tbigint(static_cast(arg0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..17aad3b23e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeBoolTboolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeBoolTboolPhysicalFunction::EverNeBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_ne_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..96711b5616 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeFloatTfloatPhysicalFunction::EverNeFloatTfloatPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", v, ts_str); + Temporal* temp = tfloat_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_ne_float_tfloat(d, temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..efe0c7ca48 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeGeoTrgeometryPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EverNeGeoTrgeometryPhysicalFunction::EverNeGeoTrgeometryPhysicalFunction(PhysicalFunction tgt_wkt, PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(tgt_wkt)); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); +} + +VarVal EverNeGeoTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto tgt_wkt = paramFns[0].execute(record, arena); + auto ref_wkt = paramFns[1].execute(record, arena); + auto x = paramFns[2].execute(record, arena).cast(); + auto y = paramFns[3].execute(record, arena).cast(); + auto theta = paramFns[4].execute(record, arena).cast(); + auto ts = paramFns[5].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* tgt_wkt, uint32_t tgt_len, const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) return 0.0; + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) { free(gs_tgt); return 0.0; } + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_tgt); free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) { free(gs_tgt); return 0.0; } + int r = ever_ne_geo_trgeometry(gs_tgt, (Temporal*)inst); + free(gs_tgt); free(inst); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + tgt_wkt, ref_wkt, x, y, theta, ts); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeGeoTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverNeGeoTrgeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EverNeGeoTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..103a853ac4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeIntTintPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeIntTintPhysicalFunction::EverNeIntTintPhysicalFunction(PhysicalFunction scalarFunction, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(scalarFunction)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto scalar = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double d, double v, uint64_t t) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string ts_str = MEOS::Meos::convertEpochToTimestamp(t); + std::string wkt = fmt::format("{}@{}", static_cast(v), ts_str); + Temporal* temp = tint_in(wkt.c_str()); + if (!temp) return 0.0; + int r = ever_ne_int_tint(static_cast(d), temp); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + scalar, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeNpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeNpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..2e3f7b3f07 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeNpointTnpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeNpointTnpointPhysicalFunction::EverNeNpointTnpointPhysicalFunction(PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeNpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid0 = parameterValues[0].cast>(); + auto frac0 = parameterValues[1].cast>(); + auto rid = parameterValues[2].cast>(); + auto frac = parameterValues[3].cast>(); + auto ts = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t rid0, + double frac0, + int64_t rid, + double frac, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = ever_ne_npoint_tnpoint(np0, temp); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid0, frac0, rid, frac, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeNpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EverNeNpointTnpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EverNeNpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNePoseTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNePoseTposePhysicalFunction.cpp new file mode 100644 index 0000000000..2e1be99d52 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNePoseTposePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNePoseTposePhysicalFunction::EverNePoseTposePhysicalFunction(PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNePoseTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto px0 = parameterValues[0].cast>(); + auto py0 = parameterValues[1].cast>(); + auto ptheta0 = parameterValues[2].cast>(); + auto x = parameterValues[3].cast>(); + auto y = parameterValues[4].cast>(); + auto theta = parameterValues[5].cast>(); + auto ts = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double px0, + double py0, + double ptheta0, + double x, + double y, + double theta, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = ever_ne_pose_tpose(pose0, temp); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + px0, py0, ptheta0, x, y, theta, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNePoseTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "EverNePoseTposePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return EverNePoseTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..b8645c455c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTbigintBigintPhysicalFunction::EverNeTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverNeTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_ne_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..8bf1990d4a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTboolBoolPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTboolBoolPhysicalFunction::EverNeTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverNeTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + int r = ever_ne_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..e9f4e920ae --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTcbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTcbufferCbufferPhysicalFunction::EverNeTcbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal EverNeTcbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = ever_ne_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTcbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EverNeTcbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EverNeTcbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..312c3b5279 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTcbufferTcbufferPhysicalFunction::EverNeTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverNeTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = ever_ne_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EverNeTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EverNeTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..673c7155e7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTemporalTemporalPhysicalFunction::EverNeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverNeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_ne_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverNeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverNeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..4e5897fe03 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverNeTextTtextPhysicalFunction::EverNeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_ne_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..485830adde --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTfloatFloatPhysicalFunction::EverNeTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_ne_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..bf881440e7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTgeoGeoPhysicalFunction::EverNeTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal EverNeTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return ever_ne_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EverNeTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EverNeTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..b3a67e8426 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTgeoTgeoPhysicalFunction::EverNeTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal EverNeTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ever_ne_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverNeTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverNeTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.cpp new file mode 100644 index 0000000000..b08acee83a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTh3indexH3indexPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTh3indexH3indexPhysicalFunction::EverNeTh3indexH3indexPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverNeTh3indexH3indexPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = ever_ne_th3index_h3index(temp, (H3Index)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTh3indexH3indexPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTh3indexH3indexPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTh3indexH3indexPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..6f2573e8b8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTintIntPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTintIntPhysicalFunction::EverNeTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal EverNeTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = ever_ne_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..76c9cec1f8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTjsonbJsonbPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTjsonbJsonbPhysicalFunction::EverNeTjsonbJsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverNeTjsonbJsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = ever_ne_tjsonb_jsonb(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTjsonbJsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTjsonbJsonbPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTjsonbJsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.cpp new file mode 100644 index 0000000000..5b22e7b0ef --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTjsonbTjsonbPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTjsonbTjsonbPhysicalFunction::EverNeTjsonbTjsonbPhysicalFunction(PhysicalFunction json_strFunction, + PhysicalFunction tsFunction, + PhysicalFunction json0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(json_strFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(json0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal EverNeTjsonbTjsonbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto json_str = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto json0 = parameterValues[2].cast(); + auto ts0 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](const char* json_strPtr, uint32_t json_strSize, + uint64_t ts, + const char* json0Ptr, uint32_t json0Size, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(json_strPtr, json_strSize); + Jsonb* tempJb = jsonb_in(tempS.c_str()); + if (!tempJb) return 0.0; + Temporal* temp = (Temporal*)tjsonbinst_make(tempJb, (TimestampTz)ts); + free(tempJb); + if (!temp) return 0.0; + std::string json0S(json0Ptr, json0Size); + Jsonb* jb0 = jsonb_in(json0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tjsonbinst_make(jb0, (TimestampTz)ts0); + free(jb0); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_ne_tjsonb_tjsonb(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + json_str.getContent(), json_str.getContentSize(), ts, json0.getContent(), json0.getContentSize(), ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTjsonbTjsonbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "EverNeTjsonbTjsonbPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return EverNeTjsonbTjsonbPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTnpointNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTnpointNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..e2c2162c8a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTnpointNpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTnpointNpointPhysicalFunction::EverNeTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); +} + +VarVal EverNeTnpointNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = ever_ne_tnpoint_npoint(temp, np0); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTnpointNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "EverNeTnpointNpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return EverNeTnpointNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..423308175f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTnpointTnpointPhysicalFunction.cpp @@ -0,0 +1,120 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTnpointTnpointPhysicalFunction::EverNeTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal EverNeTnpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + auto ts0 = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tnpointinst_make(np0, (TimestampTz)ts0); + free(np0); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_ne_tnpoint_tnpoint(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTnpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverNeTnpointTnpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return EverNeTnpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTposePosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTposePosePhysicalFunction.cpp new file mode 100644 index 0000000000..ad5208a732 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTposePosePhysicalFunction.cpp @@ -0,0 +1,121 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTposePosePhysicalFunction::EverNeTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); +} + +VarVal EverNeTposePosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = ever_ne_tpose_pose(temp, pose0); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTposePosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "EverNeTposePosePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return EverNeTposePosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTposeTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTposeTposePhysicalFunction.cpp new file mode 100644 index 0000000000..0228b579f3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTposeTposePhysicalFunction.cpp @@ -0,0 +1,129 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTposeTposePhysicalFunction::EverNeTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal EverNeTposeTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + auto ts0 = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0A = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0A) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tposeinst_make(pose0A, (TimestampTz)ts0); + free(pose0A); + if (!inst0) { free(temp); return 0.0; } + + double r = ever_ne_tpose_tpose(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTposeTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "EverNeTposeTposePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return EverNeTposeTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.cpp new file mode 100644 index 0000000000..b8e04d3187 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTquadbinQuadbinPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +EverNeTquadbinQuadbinPhysicalFunction::EverNeTquadbinQuadbinPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverNeTquadbinQuadbinPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = (Temporal*)tquadbininst_make((Quadbin)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = ever_ne_tquadbin_quadbin(temp, (Quadbin)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTquadbinQuadbinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTquadbinQuadbinPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTquadbinQuadbinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..f0a6d1da5a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EverNeTrgeometryGeoPhysicalFunction::EverNeTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal EverNeTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref_wkt = paramFns[0].execute(record, arena); + auto x = paramFns[1].execute(record, arena).cast(); + auto y = paramFns[2].execute(record, arena).cast(); + auto theta = paramFns[3].execute(record, arena).cast(); + auto ts = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) return 0.0; + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) return 0.0; + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst); return 0.0; } + int r = ever_ne_trgeometry_geo((Temporal*)inst, gs_tgt); + free(inst); free(gs_tgt); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x, y, theta, ts, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "EverNeTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return EverNeTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..347c00a985 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,115 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +EverNeTrgeometryTrgeometryPhysicalFunction::EverNeTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) +{ + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal EverNeTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref1_wkt = paramFns[0].execute(record, arena); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* s1 = (char*)malloc(ref1_len + 1); + memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\0'; + GSERIALIZED* gs1 = geom_in(s1, -1); free(s1); + if (!gs1) return 0.0; + Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!p1) { free(gs1); return 0.0; } + TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1); + free(gs1); free(p1); + if (!inst1) return 0.0; + char* s2 = (char*)malloc(ref2_len + 1); + memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\0'; + GSERIALIZED* gs2 = geom_in(s2, -1); free(s2); + if (!gs2) { free(inst1); return 0.0; } + Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!p2) { free(inst1); free(gs2); return 0.0; } + TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2); + free(gs2); free(p2); + if (!inst2) { free(inst1); return 0.0; } + int r = ever_ne_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r > 0 ? 1.0 : 0.0; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 10, + "EverNeTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return EverNeTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/EverNeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/EverNeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..9961c29d6c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/EverNeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +EverNeTtextTextPhysicalFunction::EverNeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal EverNeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = ever_ne_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterEverNeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "EverNeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return EverNeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FloatspanLowerIncPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FloatspanLowerIncPhysicalFunction.cpp new file mode 100644 index 0000000000..d8cf63a2fe --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FloatspanLowerIncPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +FloatspanLowerIncPhysicalFunction::FloatspanLowerIncPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal FloatspanLowerIncPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = span_lower_inc(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFloatspanLowerIncPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "FloatspanLowerIncPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return FloatspanLowerIncPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FloatspanLowerPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FloatspanLowerPhysicalFunction.cpp new file mode 100644 index 0000000000..ea646c04df --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FloatspanLowerPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +FloatspanLowerPhysicalFunction::FloatspanLowerPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal FloatspanLowerPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = floatspan_lower(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFloatspanLowerPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "FloatspanLowerPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return FloatspanLowerPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FloatspanUpperIncPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FloatspanUpperIncPhysicalFunction.cpp new file mode 100644 index 0000000000..0fa721235c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FloatspanUpperIncPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +FloatspanUpperIncPhysicalFunction::FloatspanUpperIncPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal FloatspanUpperIncPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = span_upper_inc(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFloatspanUpperIncPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "FloatspanUpperIncPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return FloatspanUpperIncPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FloatspanUpperPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FloatspanUpperPhysicalFunction.cpp new file mode 100644 index 0000000000..e9f2147002 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FloatspanUpperPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +FloatspanUpperPhysicalFunction::FloatspanUpperPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal FloatspanUpperPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = floatspan_upper(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFloatspanUpperPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "FloatspanUpperPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return FloatspanUpperPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FloatspanWidthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FloatspanWidthPhysicalFunction.cpp new file mode 100644 index 0000000000..e8cd08d63f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FloatspanWidthPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +FloatspanWidthPhysicalFunction::FloatspanWidthPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal FloatspanWidthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = floatspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = floatspan_width(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFloatspanWidthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "FloatspanWidthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return FloatspanWidthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FrontStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FrontStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..91ea742a04 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FrontStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +FrontStboxStboxPhysicalFunction::FrontStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal FrontStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = front_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFrontStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "FrontStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return FrontStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FrontStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FrontStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..8fa17864ad --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FrontStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +FrontStboxTspatialPhysicalFunction::FrontStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal FrontStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = front_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFrontStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "FrontStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return FrontStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FrontTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FrontTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..4871fdea21 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FrontTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +FrontTspatialStboxPhysicalFunction::FrontTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal FrontTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = front_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFrontTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "FrontTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return FrontTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/FrontTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/FrontTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..35e8095aec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/FrontTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +FrontTspatialTspatialPhysicalFunction::FrontTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal FrontTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return front_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterFrontTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "FrontTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return FrontTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoAsEwktPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoAsEwktPhysicalFunction.cpp new file mode 100644 index 0000000000..8a19aaa161 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoAsEwktPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoAsEwktPhysicalFunction::GeoAsEwktPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoAsEwktPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + char* out = geo_as_ewkt(temp, (int)arg0); + free(temp); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoAsEwktPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoAsEwktPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoAsEwktPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoAsGeojsonPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoAsGeojsonPhysicalFunction.cpp new file mode 100644 index 0000000000..971046f1bd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoAsGeojsonPhysicalFunction.cpp @@ -0,0 +1,110 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoAsGeojsonPhysicalFunction::GeoAsGeojsonPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal GeoAsGeojsonPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + auto arg1 = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + double arg1, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + char* out = geo_as_geojson(temp, (int)arg0, (int)arg1, nullptr); + free(temp); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, arg1, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoAsGeojsonPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeoAsGeojsonPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeoAsGeojsonPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoEqualsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoEqualsPhysicalFunction.cpp new file mode 100644 index 0000000000..0ebb956f3b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoEqualsPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoEqualsPhysicalFunction::GeoEqualsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoEqualsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_equals(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoEqualsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoEqualsPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoEqualsPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoGeoNPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoGeoNPhysicalFunction.cpp new file mode 100644 index 0000000000..51ca4e6d29 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoGeoNPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoGeoNPhysicalFunction::GeoGeoNPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoGeoNPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geo_geo_n(temp, (int)arg0); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoGeoNPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoGeoNPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoGeoNPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoIsUnitaryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoIsUnitaryPhysicalFunction.cpp new file mode 100644 index 0000000000..213227592e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoIsUnitaryPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoIsUnitaryPhysicalFunction::GeoIsUnitaryPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeoIsUnitaryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geo_is_unitary(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoIsUnitaryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoIsUnitaryPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoIsUnitaryPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoNumGeosPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoNumGeosPhysicalFunction.cpp new file mode 100644 index 0000000000..d4a2142419 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoNumGeosPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoNumGeosPhysicalFunction::GeoNumGeosPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeoNumGeosPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geo_num_geos(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoNumGeosPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoNumGeosPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoNumGeosPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoNumPointsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoNumPointsPhysicalFunction.cpp new file mode 100644 index 0000000000..80947f7165 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoNumPointsPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoNumPointsPhysicalFunction::GeoNumPointsPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeoNumPointsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geo_num_points(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoNumPointsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoNumPointsPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoNumPointsPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoPointsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoPointsPhysicalFunction.cpp new file mode 100644 index 0000000000..79106d5671 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoPointsPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoPointsPhysicalFunction::GeoPointsPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeoPointsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geo_points(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoPointsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoPointsPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoPointsPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoReversePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoReversePhysicalFunction.cpp new file mode 100644 index 0000000000..10d84f57b9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoReversePhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoReversePhysicalFunction::GeoReversePhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeoReversePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geo_reverse(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoReversePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoReversePhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoReversePhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoRoundPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoRoundPhysicalFunction.cpp new file mode 100644 index 0000000000..3f2f91a8f6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoRoundPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoRoundPhysicalFunction::GeoRoundPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoRoundPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geo_round(temp, (int)dec); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoRoundPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoRoundPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoRoundPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoSamePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoSamePhysicalFunction.cpp new file mode 100644 index 0000000000..6617de137b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoSamePhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoSamePhysicalFunction::GeoSamePhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoSamePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geo_same(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoSamePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoSamePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoSamePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoSetSridPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoSetSridPhysicalFunction.cpp new file mode 100644 index 0000000000..e324c377f7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoSetSridPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoSetSridPhysicalFunction::GeoSetSridPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoSetSridPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + uint64_t arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geo_set_srid(temp, (int32_t)srid); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoSetSridPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoSetSridPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoSetSridPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoSridPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoSridPhysicalFunction.cpp new file mode 100644 index 0000000000..2c565363e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoSridPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoSridPhysicalFunction::GeoSridPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeoSridPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geo_srid(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoSridPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeoSridPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeoSridPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeoTransformPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeoTransformPhysicalFunction.cpp new file mode 100644 index 0000000000..e1ed76db3e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeoTransformPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeoTransformPhysicalFunction::GeoTransformPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeoTransformPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + uint64_t arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geo_transform(temp, (int32_t)srid); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeoTransformPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeoTransformPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeoTransformPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogAreaPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogAreaPhysicalFunction.cpp new file mode 100644 index 0000000000..41459242bc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogAreaPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogAreaPhysicalFunction::GeogAreaPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeogAreaPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geog_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geog_area(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogAreaPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeogAreaPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeogAreaPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogCentroidPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogCentroidPhysicalFunction.cpp new file mode 100644 index 0000000000..43dd6a8167 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogCentroidPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogCentroidPhysicalFunction::GeogCentroidPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeogCentroidPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geog_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geog_centroid(temp, (bool)arg0); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogCentroidPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeogCentroidPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeogCentroidPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogDistancePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogDistancePhysicalFunction.cpp new file mode 100644 index 0000000000..a7c673b751 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogDistancePhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogDistancePhysicalFunction::GeogDistancePhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeogDistancePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geog_distance(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogDistancePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeogDistancePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeogDistancePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogDwithinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogDwithinPhysicalFunction.cpp new file mode 100644 index 0000000000..7bfd78137f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogDwithinPhysicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogDwithinPhysicalFunction::GeogDwithinPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal GeogDwithinPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + auto arg1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + double arg1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geog_dwithin(temp, gs0, arg1); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogDwithinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeogDwithinPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeogDwithinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogIntersectsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogIntersectsPhysicalFunction.cpp new file mode 100644 index 0000000000..b95ca1b50d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogIntersectsPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogIntersectsPhysicalFunction::GeogIntersectsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeogIntersectsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geog_intersects(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogIntersectsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeogIntersectsPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeogIntersectsPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogLengthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogLengthPhysicalFunction.cpp new file mode 100644 index 0000000000..4fcd163ebe --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogLengthPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogLengthPhysicalFunction::GeogLengthPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeogLengthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geog_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geog_length(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogLengthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeogLengthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeogLengthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogPerimeterPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogPerimeterPhysicalFunction.cpp new file mode 100644 index 0000000000..30bf433f12 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogPerimeterPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogPerimeterPhysicalFunction::GeogPerimeterPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeogPerimeterPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geog_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geog_perimeter(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogPerimeterPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeogPerimeterPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeogPerimeterPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogPointMake2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogPointMake2dPhysicalFunction.cpp new file mode 100644 index 0000000000..ba19435de3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogPointMake2dPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogPointMake2dPhysicalFunction::GeogPointMake2dPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(sridFunction)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); +} + +VarVal GeogPointMake2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto srid = parameterValues[0].cast>(); + auto x = parameterValues[1].cast>(); + auto y = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t srid, + double x, + double y, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = geogpoint_make2d((int32_t)srid, x, y); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + srid, x, y, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogPointMake2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeogPointMake2dPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeogPointMake2dPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogPointMake3dzPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogPointMake3dzPhysicalFunction.cpp new file mode 100644 index 0000000000..a5bff5f9b2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogPointMake3dzPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogPointMake3dzPhysicalFunction::GeogPointMake3dzPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction zFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(sridFunction)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(zFunction)); +} + +VarVal GeogPointMake3dzPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto srid = parameterValues[0].cast>(); + auto x = parameterValues[1].cast>(); + auto y = parameterValues[2].cast>(); + auto z = parameterValues[3].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t srid, + double x, + double y, + double z, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = geogpoint_make3dz((int32_t)srid, x, y, z); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + srid, x, y, z, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogPointMake3dzPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "GeogPointMake3dzPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return GeogPointMake3dzPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeogToGeomPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeogToGeomPhysicalFunction.cpp new file mode 100644 index 0000000000..4439d7f6d7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeogToGeomPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeogToGeomPhysicalFunction::GeogToGeomPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeogToGeomPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geog_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geog_to_geom(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeogToGeomPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeogToGeomPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeogToGeomPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomAzimuthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomAzimuthPhysicalFunction.cpp new file mode 100644 index 0000000000..831c9b4325 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomAzimuthPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomAzimuthPhysicalFunction::GeomAzimuthPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomAzimuthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geom_azimuth(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomAzimuthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomAzimuthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomAzimuthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomBoundaryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomBoundaryPhysicalFunction.cpp new file mode 100644 index 0000000000..9d6181f684 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomBoundaryPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomBoundaryPhysicalFunction::GeomBoundaryPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomBoundaryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geom_boundary(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomBoundaryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomBoundaryPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomBoundaryPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomCentroidPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomCentroidPhysicalFunction.cpp new file mode 100644 index 0000000000..797fbe84db --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomCentroidPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomCentroidPhysicalFunction::GeomCentroidPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomCentroidPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geom_centroid(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomCentroidPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomCentroidPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomCentroidPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomContainsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomContainsPhysicalFunction.cpp new file mode 100644 index 0000000000..7e82360cc8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomContainsPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomContainsPhysicalFunction::GeomContainsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomContainsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_contains(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomContainsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomContainsPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomContainsPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomConvexHullPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomConvexHullPhysicalFunction.cpp new file mode 100644 index 0000000000..8eb2fdd63b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomConvexHullPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomConvexHullPhysicalFunction::GeomConvexHullPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomConvexHullPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geom_convex_hull(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomConvexHullPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomConvexHullPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomConvexHullPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomCoversPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomCoversPhysicalFunction.cpp new file mode 100644 index 0000000000..7a2fc977b2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomCoversPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomCoversPhysicalFunction::GeomCoversPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomCoversPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_covers(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomCoversPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomCoversPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomCoversPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDifference2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDifference2dPhysicalFunction.cpp new file mode 100644 index 0000000000..5432bcba1d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDifference2dPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDifference2dPhysicalFunction::GeomDifference2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomDifference2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0u; } + + GSERIALIZED* gres = geom_difference2d(temp, gs0); + free(temp); + free(gs0); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDifference2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomDifference2dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomDifference2dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDisjoint2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDisjoint2dPhysicalFunction.cpp new file mode 100644 index 0000000000..4a5cf9048a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDisjoint2dPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDisjoint2dPhysicalFunction::GeomDisjoint2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomDisjoint2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_disjoint2d(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDisjoint2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomDisjoint2dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomDisjoint2dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDistance2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDistance2dPhysicalFunction.cpp new file mode 100644 index 0000000000..1c22ecc349 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDistance2dPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDistance2dPhysicalFunction::GeomDistance2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomDistance2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_distance2d(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDistance2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomDistance2dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomDistance2dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDistance3dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDistance3dPhysicalFunction.cpp new file mode 100644 index 0000000000..568e9931da --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDistance3dPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDistance3dPhysicalFunction::GeomDistance3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomDistance3dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_distance3d(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDistance3dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomDistance3dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomDistance3dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDwithin2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDwithin2dPhysicalFunction.cpp new file mode 100644 index 0000000000..1a94d473c6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDwithin2dPhysicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDwithin2dPhysicalFunction::GeomDwithin2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal GeomDwithin2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + auto arg1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + double arg1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_dwithin2d(temp, gs0, arg1); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDwithin2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeomDwithin2dPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeomDwithin2dPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDwithin3dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDwithin3dPhysicalFunction.cpp new file mode 100644 index 0000000000..fbdf788366 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDwithin3dPhysicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDwithin3dPhysicalFunction::GeomDwithin3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal GeomDwithin3dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + auto arg1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + double arg1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_dwithin3d(temp, gs0, arg1); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDwithin3dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeomDwithin3dPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeomDwithin3dPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomDwithinPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomDwithinPhysicalFunction.cpp new file mode 100644 index 0000000000..ec5742666d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomDwithinPhysicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomDwithinPhysicalFunction::GeomDwithinPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal GeomDwithinPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + auto arg1 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + double arg1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_dwithin(temp, gs0, arg1); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomDwithinPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeomDwithinPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeomDwithinPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomIntersection2dCollPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomIntersection2dCollPhysicalFunction.cpp new file mode 100644 index 0000000000..cb602dd2b8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomIntersection2dCollPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomIntersection2dCollPhysicalFunction::GeomIntersection2dCollPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomIntersection2dCollPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0u; } + + GSERIALIZED* gres = geom_intersection2d_coll(temp, gs0); + free(temp); + free(gs0); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomIntersection2dCollPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomIntersection2dCollPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomIntersection2dCollPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomIntersection2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomIntersection2dPhysicalFunction.cpp new file mode 100644 index 0000000000..630f782b1d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomIntersection2dPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomIntersection2dPhysicalFunction::GeomIntersection2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomIntersection2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0u; } + + GSERIALIZED* gres = geom_intersection2d(temp, gs0); + free(temp); + free(gs0); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomIntersection2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomIntersection2dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomIntersection2dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomIntersects2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomIntersects2dPhysicalFunction.cpp new file mode 100644 index 0000000000..105e4212f5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomIntersects2dPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomIntersects2dPhysicalFunction::GeomIntersects2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomIntersects2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_intersects2d(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomIntersects2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomIntersects2dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomIntersects2dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomIntersects3dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomIntersects3dPhysicalFunction.cpp new file mode 100644 index 0000000000..00af55e41f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomIntersects3dPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomIntersects3dPhysicalFunction::GeomIntersects3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomIntersects3dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_intersects3d(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomIntersects3dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomIntersects3dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomIntersects3dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomIntersectsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomIntersectsPhysicalFunction.cpp new file mode 100644 index 0000000000..196b810da0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomIntersectsPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomIntersectsPhysicalFunction::GeomIntersectsPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomIntersectsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_intersects(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomIntersectsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomIntersectsPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomIntersectsPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomIsEmptyPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomIsEmptyPhysicalFunction.cpp new file mode 100644 index 0000000000..0ccd3d0397 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomIsEmptyPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomIsEmptyPhysicalFunction::GeomIsEmptyPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomIsEmptyPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geom_is_empty(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomIsEmptyPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomIsEmptyPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomIsEmptyPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomLengthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomLengthPhysicalFunction.cpp new file mode 100644 index 0000000000..f60208c45a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomLengthPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomLengthPhysicalFunction::GeomLengthPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomLengthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geom_length(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomLengthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomLengthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomLengthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomPerimeterPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomPerimeterPhysicalFunction.cpp new file mode 100644 index 0000000000..30090e6373 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomPerimeterPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomPerimeterPhysicalFunction::GeomPerimeterPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomPerimeterPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = geom_perimeter(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomPerimeterPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomPerimeterPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomPerimeterPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomPointMake2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomPointMake2dPhysicalFunction.cpp new file mode 100644 index 0000000000..e5c6c7fb80 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomPointMake2dPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomPointMake2dPhysicalFunction::GeomPointMake2dPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(sridFunction)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); +} + +VarVal GeomPointMake2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto srid = parameterValues[0].cast>(); + auto x = parameterValues[1].cast>(); + auto y = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t srid, + double x, + double y, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = geompoint_make2d((int32_t)srid, x, y); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + srid, x, y, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomPointMake2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "GeomPointMake2dPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return GeomPointMake2dPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomPointMake3dzPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomPointMake3dzPhysicalFunction.cpp new file mode 100644 index 0000000000..878e4669a3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomPointMake3dzPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomPointMake3dzPhysicalFunction::GeomPointMake3dzPhysicalFunction(PhysicalFunction sridFunction, + PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction zFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(sridFunction)); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(zFunction)); +} + +VarVal GeomPointMake3dzPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto srid = parameterValues[0].cast>(); + auto x = parameterValues[1].cast>(); + auto y = parameterValues[2].cast>(); + auto z = parameterValues[3].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t srid, + double x, + double y, + double z, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + GSERIALIZED* gres = geompoint_make3dz((int32_t)srid, x, y, z); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + srid, x, y, z, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomPointMake3dzPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "GeomPointMake3dzPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return GeomPointMake3dzPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomShortestline2dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomShortestline2dPhysicalFunction.cpp new file mode 100644 index 0000000000..d8e4b37017 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomShortestline2dPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomShortestline2dPhysicalFunction::GeomShortestline2dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomShortestline2dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0u; } + + GSERIALIZED* gres = geom_shortestline2d(temp, gs0); + free(temp); + free(gs0); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomShortestline2dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomShortestline2dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomShortestline2dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomShortestline3dPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomShortestline3dPhysicalFunction.cpp new file mode 100644 index 0000000000..95da1409bd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomShortestline3dPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomShortestline3dPhysicalFunction::GeomShortestline3dPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomShortestline3dPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0u; } + + GSERIALIZED* gres = geom_shortestline3d(temp, gs0); + free(temp); + free(gs0); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomShortestline3dPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomShortestline3dPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomShortestline3dPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomToGeogPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomToGeogPhysicalFunction.cpp new file mode 100644 index 0000000000..41a1783565 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomToGeogPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomToGeogPhysicalFunction::GeomToGeogPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomToGeogPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geog_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geom_to_geog(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomToGeogPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomToGeogPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomToGeogPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomTouchesPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomTouchesPhysicalFunction.cpp new file mode 100644 index 0000000000..866b05a3c5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomTouchesPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomTouchesPhysicalFunction::GeomTouchesPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal GeomTouchesPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = geom_touches(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomTouchesPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "GeomTouchesPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return GeomTouchesPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/GeomUnaryUnionPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/GeomUnaryUnionPhysicalFunction.cpp new file mode 100644 index 0000000000..6d48da78fa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/GeomUnaryUnionPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +GeomUnaryUnionPhysicalFunction::GeomUnaryUnionPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal GeomUnaryUnionPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = geom_unary_union(temp); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterGeomUnaryUnionPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "GeomUnaryUnionPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return GeomUnaryUnionPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexCmpPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexCmpPhysicalFunction.cpp new file mode 100644 index 0000000000..fd00b4557c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexCmpPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexCmpPhysicalFunction::H3indexCmpPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexCmpPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_cmp((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexCmpPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexCmpPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexCmpPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexEqPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexEqPhysicalFunction.cpp new file mode 100644 index 0000000000..23b04d3ac3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexEqPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexEqPhysicalFunction::H3indexEqPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexEqPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_eq((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexEqPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexEqPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexEqPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexGePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexGePhysicalFunction.cpp new file mode 100644 index 0000000000..728d4d84bf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexGePhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexGePhysicalFunction::H3indexGePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexGePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_ge((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexGePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexGePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexGePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexGtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexGtPhysicalFunction.cpp new file mode 100644 index 0000000000..ad440191e1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexGtPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexGtPhysicalFunction::H3indexGtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexGtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_gt((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexGtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexGtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexGtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexLePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexLePhysicalFunction.cpp new file mode 100644 index 0000000000..9cf73bafd3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexLePhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexLePhysicalFunction::H3indexLePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexLePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_le((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexLePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexLePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexLePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexLtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexLtPhysicalFunction.cpp new file mode 100644 index 0000000000..108ef6d80b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexLtPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexLtPhysicalFunction::H3indexLtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexLtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_lt((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexLtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexLtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexLtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexNePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexNePhysicalFunction.cpp new file mode 100644 index 0000000000..fa062c33bc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexNePhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexNePhysicalFunction::H3indexNePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal H3indexNePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = h3index_ne((H3Index)a, (H3Index)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexNePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "H3indexNePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return H3indexNePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/H3indexOutPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/H3indexOutPhysicalFunction.cpp new file mode 100644 index 0000000000..fc292a70dc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/H3indexOutPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +H3indexOutPhysicalFunction::H3indexOutPhysicalFunction(PhysicalFunction cellFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(cellFunction)); +} + +VarVal H3indexOutPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + H3Index hcell = h3index_out((H3Index)cell); + if (hcell == 0) return 0u; + char* hex = h3index_out(hcell); + if (!hex) return 0u; + uint32_t len = static_cast(strlen(hex)); + if (len > bufMax) len = bufMax; + memcpy(buf, hex, len); + free(hex); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterH3indexOutPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "H3indexOutPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return H3indexOutPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/IntspanLowerIncPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/IntspanLowerIncPhysicalFunction.cpp new file mode 100644 index 0000000000..c1e30ff490 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/IntspanLowerIncPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +IntspanLowerIncPhysicalFunction::IntspanLowerIncPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal IntspanLowerIncPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = span_lower_inc(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterIntspanLowerIncPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "IntspanLowerIncPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return IntspanLowerIncPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/IntspanLowerPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/IntspanLowerPhysicalFunction.cpp new file mode 100644 index 0000000000..e62d8e4616 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/IntspanLowerPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +IntspanLowerPhysicalFunction::IntspanLowerPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal IntspanLowerPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = intspan_lower(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterIntspanLowerPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "IntspanLowerPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return IntspanLowerPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/IntspanUpperIncPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/IntspanUpperIncPhysicalFunction.cpp new file mode 100644 index 0000000000..5110220fff --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/IntspanUpperIncPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +IntspanUpperIncPhysicalFunction::IntspanUpperIncPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal IntspanUpperIncPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = span_upper_inc(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterIntspanUpperIncPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "IntspanUpperIncPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return IntspanUpperIncPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/IntspanUpperPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/IntspanUpperPhysicalFunction.cpp new file mode 100644 index 0000000000..d29da96aac --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/IntspanUpperPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +IntspanUpperPhysicalFunction::IntspanUpperPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal IntspanUpperPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = intspan_upper(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterIntspanUpperPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "IntspanUpperPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return IntspanUpperPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/IntspanWidthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/IntspanWidthPhysicalFunction.cpp new file mode 100644 index 0000000000..74e89fd6b0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/IntspanWidthPhysicalFunction.cpp @@ -0,0 +1,87 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +IntspanWidthPhysicalFunction::IntspanWidthPhysicalFunction(PhysicalFunction spFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(spFunction)); +} + +VarVal IntspanWidthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto sp = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* spPtr, uint32_t spSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(spPtr, spSize); + Span* temp = intspan_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = intspan_width(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + sp.getContent(), sp.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterIntspanWidthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "IntspanWidthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return IntspanWidthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbArrayElementTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbArrayElementTextPhysicalFunction.cpp new file mode 100644 index 0000000000..4abc81b574 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbArrayElementTextPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbArrayElementTextPhysicalFunction::JsonbArrayElementTextPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbArrayElementTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0u; + + text* tres = jsonb_array_element_text(temp, (int)idx_d); + free(temp); + if (!tres) return 0u; + char* out = text_to_cstring(tres); + free(tres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + jb.getContent(), jb.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbArrayElementTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbArrayElementTextPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbArrayElementTextPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbArrayLengthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbArrayLengthPhysicalFunction.cpp new file mode 100644 index 0000000000..7c133b0b80 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbArrayLengthPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbArrayLengthPhysicalFunction::JsonbArrayLengthPhysicalFunction(PhysicalFunction jbFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(jbFunction)); +} + +VarVal JsonbArrayLengthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + + double r = jsonb_array_length(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbArrayLengthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "JsonbArrayLengthPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return JsonbArrayLengthPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbCmpPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbCmpPhysicalFunction.cpp new file mode 100644 index 0000000000..b00b2aa063 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbCmpPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbCmpPhysicalFunction::JsonbCmpPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbCmpPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_cmp(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbCmpPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbCmpPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbCmpPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbContainedPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbContainedPhysicalFunction.cpp new file mode 100644 index 0000000000..24ceb01d77 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbContainedPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbContainedPhysicalFunction::JsonbContainedPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbContainedPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_contained(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbContainedPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbContainedPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbContainedPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbContainsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbContainsPhysicalFunction.cpp new file mode 100644 index 0000000000..0751b8b0c3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbContainsPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbContainsPhysicalFunction::JsonbContainsPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbContainsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_contains(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbContainsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbContainsPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbContainsPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbEqPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbEqPhysicalFunction.cpp new file mode 100644 index 0000000000..1560b6d5e2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbEqPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbEqPhysicalFunction::JsonbEqPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbEqPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_eq(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbEqPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbEqPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbEqPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbExistsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbExistsPhysicalFunction.cpp new file mode 100644 index 0000000000..d919fcd24d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbExistsPhysicalFunction.cpp @@ -0,0 +1,99 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbExistsPhysicalFunction::JsonbExistsPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbExistsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = jsonb_exists(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbExistsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbExistsPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbExistsPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbGePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbGePhysicalFunction.cpp new file mode 100644 index 0000000000..0a6d886d5f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbGePhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbGePhysicalFunction::JsonbGePhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbGePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_ge(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbGePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbGePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbGePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbGtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbGtPhysicalFunction.cpp new file mode 100644 index 0000000000..cc33f1aa28 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbGtPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbGtPhysicalFunction::JsonbGtPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbGtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_gt(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbGtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbGtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbGtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbLePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbLePhysicalFunction.cpp new file mode 100644 index 0000000000..f094bdb8b0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbLePhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbLePhysicalFunction::JsonbLePhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbLePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_le(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbLePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbLePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbLePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbLtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbLtPhysicalFunction.cpp new file mode 100644 index 0000000000..4a83a25b23 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbLtPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbLtPhysicalFunction::JsonbLtPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbLtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_lt(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbLtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbLtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbLtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbNePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbNePhysicalFunction.cpp new file mode 100644 index 0000000000..fa45583296 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbNePhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbNePhysicalFunction::JsonbNePhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbNePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + Jsonb* jb0 = jsonb_in(arg0S.c_str()); + if (!jb0) { free(temp); return 0.0; } + + double r = jsonb_ne(temp, jb0); + free(temp); + free(jb0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbNePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbNePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbNePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.cpp new file mode 100644 index 0000000000..7190361f57 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbObjectFieldTextPhysicalFunction.cpp @@ -0,0 +1,114 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbObjectFieldTextPhysicalFunction::JsonbObjectFieldTextPhysicalFunction(PhysicalFunction jbFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(jbFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal JsonbObjectFieldTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0u; } + + text* tres = jsonb_object_field_text(temp, txt0); + free(temp); + free(txt0); + if (!tres) return 0u; + char* out = text_to_cstring(tres); + free(tres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + jb.getContent(), jb.getContentSize(), arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbObjectFieldTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "JsonbObjectFieldTextPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return JsonbObjectFieldTextPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbPrettyPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbPrettyPhysicalFunction.cpp new file mode 100644 index 0000000000..8626c21a47 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbPrettyPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbPrettyPhysicalFunction::JsonbPrettyPhysicalFunction(PhysicalFunction jbFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(jbFunction)); +} + +VarVal JsonbPrettyPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0u; + + char* out = jsonb_pretty(temp); + free(temp); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + jb.getContent(), jb.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbPrettyPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "JsonbPrettyPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return JsonbPrettyPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/JsonbToCstringPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/JsonbToCstringPhysicalFunction.cpp new file mode 100644 index 0000000000..f6c78b6e86 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/JsonbToCstringPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +JsonbToCstringPhysicalFunction::JsonbToCstringPhysicalFunction(PhysicalFunction jbFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(jbFunction)); +} + +VarVal JsonbToCstringPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto jb = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* jbPtr, uint32_t jbSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(jbPtr, jbSize); + Jsonb* temp = jsonb_in(tempS.c_str()); + if (!temp) return 0u; + + char* out = jsonb_to_cstring(temp); + free(temp); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + jb.getContent(), jb.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterJsonbToCstringPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "JsonbToCstringPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return JsonbToCstringPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..559acff476 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftStboxStboxPhysicalFunction::LeftStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LeftStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = left_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "LeftStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return LeftStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..048833ee9d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftStboxTspatialPhysicalFunction::LeftStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LeftStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = left_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "LeftStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return LeftStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..094ac33f18 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftTboxTnumberPhysicalFunction::LeftTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LeftTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = left_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "LeftTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return LeftTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..40cc483aab --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftTnumberTboxPhysicalFunction::LeftTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LeftTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = left_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "LeftTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return LeftTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..93d5d855da --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftTnumberTnumberPhysicalFunction::LeftTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LeftTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = left_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "LeftTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return LeftTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..2bcd81002e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftTspatialStboxPhysicalFunction::LeftTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LeftTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = left_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "LeftTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return LeftTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LeftTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LeftTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..519c520058 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LeftTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LeftTspatialTspatialPhysicalFunction::LeftTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal LeftTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return left_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLeftTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "LeftTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return LeftTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LineInterpolatePointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LineInterpolatePointPhysicalFunction.cpp new file mode 100644 index 0000000000..c99fc449ea --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LineInterpolatePointPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LineInterpolatePointPhysicalFunction::LineInterpolatePointPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LineInterpolatePointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = line_interpolate_point(temp, arg0); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLineInterpolatePointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "LineInterpolatePointPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return LineInterpolatePointPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LineLocatePointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LineLocatePointPhysicalFunction.cpp new file mode 100644 index 0000000000..126b71771b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LineLocatePointPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LineLocatePointPhysicalFunction::LineLocatePointPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LineLocatePointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = line_locate_point(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLineLocatePointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "LineLocatePointPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return LineLocatePointPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LineNumpointsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LineNumpointsPhysicalFunction.cpp new file mode 100644 index 0000000000..c9f2b28003 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LineNumpointsPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LineNumpointsPhysicalFunction::LineNumpointsPhysicalFunction(PhysicalFunction wktFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(wktFunction)); +} + +VarVal LineNumpointsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0.0; + + double r = line_numpoints(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + wkt.getContent(), wkt.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLineNumpointsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "LineNumpointsPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return LineNumpointsPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LinePointNPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LinePointNPhysicalFunction.cpp new file mode 100644 index 0000000000..230584109b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LinePointNPhysicalFunction.cpp @@ -0,0 +1,108 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LinePointNPhysicalFunction::LinePointNPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal LinePointNPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = line_point_n(temp, (int)arg0); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLinePointNPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "LinePointNPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return LinePointNPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/LineSubstringPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/LineSubstringPhysicalFunction.cpp new file mode 100644 index 0000000000..ec77b78ab5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/LineSubstringPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +LineSubstringPhysicalFunction::LineSubstringPhysicalFunction(PhysicalFunction wktFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(wktFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal LineSubstringPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto wkt = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast>(); + auto arg1 = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* wktPtr, uint32_t wktSize, + double arg0, + double arg1, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(wktPtr, wktSize); + GSERIALIZED* temp = geom_in(tempS.c_str(), -1); + if (!temp) return 0u; + + GSERIALIZED* gres = line_substring(temp, arg0, arg1); + free(temp); + if (!gres) return 0u; + char* out = geo_as_text(gres, -1); + free(gres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + wkt.getContent(), wkt.getContentSize(), arg0, arg1, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterLineSubstringPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "LineSubstringPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return LineSubstringPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..712fe97843 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MindistanceTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,132 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MindistanceTcbufferTcbufferPhysicalFunction::MindistanceTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal MindistanceTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue, + double distValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + double r = mindistance_tcbuffer_tcbuffer(tA, tB, distValue); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMindistanceTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "MindistanceTcbufferTcbufferPhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return MindistanceTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..25f613158a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulBigintTbigintPhysicalFunction::MulBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal MulBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = mul_bigint_tbigint(static_cast(arg0), temp); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "MulBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return MulBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..63c2a87407 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulFloatTfloatPhysicalFunction::MulFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal MulFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = mul_float_tfloat(arg0, temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "MulFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return MulFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..811406e15a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulIntTintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulIntTintPhysicalFunction::MulIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal MulIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t arg0, + int32_t value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = mul_int_tint(arg0, temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "MulIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return MulIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..35b83d2eec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulTbigintBigintPhysicalFunction::MulTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal MulTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = mul_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "MulTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return MulTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..905311f9ff --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulTfloatFloatPhysicalFunction::MulTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal MulTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = mul_tfloat_float(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "MulTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return MulTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..6c61ed9947 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulTintIntPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulTintIntPhysicalFunction::MulTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal MulTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = mul_tint_int(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "MulTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return MulTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MulTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MulTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..5e7f9a2fc1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MulTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MulTnumberTnumberPhysicalFunction::MulTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal MulTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = mul_tnumber_tnumber(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMulTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "MulTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return MulTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/MultTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/MultTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..be7f88e74d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/MultTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +MultTnumberTnumberPhysicalFunction::MultTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal MultTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = mul_tnumber_tnumber(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterMultTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "MultTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return MultTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..f0416d319f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadStboxStboxPhysicalFunction::NadStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + double r = nad_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "NadStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return NadStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTcbufferGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTcbufferGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..fd1f87efaa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTcbufferGeoPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTcbufferGeoPhysicalFunction::NadTcbufferGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal NadTcbufferGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + double r = nad_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTcbufferGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "NadTcbufferGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return NadTcbufferGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTcbufferStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTcbufferStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..1cb0b4cc58 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTcbufferStboxPhysicalFunction.cpp @@ -0,0 +1,116 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +NadTcbufferStboxPhysicalFunction::NadTcbufferStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTcbufferStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto arg0 = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + double radius, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0) || radius < 0.0) return 0.0; + std::string tempWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", lon, lat, radius, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tcbuffer_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = nad_tcbuffer_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + lon, lat, radius, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTcbufferStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "NadTcbufferStboxPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return NadTcbufferStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..eddffbb420 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTcbufferTcbufferPhysicalFunction::NadTcbufferTcbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal NadTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + double r = nad_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "NadTcbufferTcbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return NadTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTfloatTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTfloatTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..4a8f131a39 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTfloatTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTfloatTboxPhysicalFunction::NadTfloatTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTfloatTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + double r = nad_tfloat_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTfloatTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "NadTfloatTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return NadTfloatTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTgeoGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTgeoGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..4ac2272a5e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTgeoGeoPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTgeoGeoPhysicalFunction::NadTgeoGeoPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal NadTgeoGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return nad_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTgeoGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "NadTgeoGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return NadTgeoGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTgeoStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTgeoStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..0c31e252eb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTgeoStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTgeoStboxPhysicalFunction::NadTgeoStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTgeoStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return 0.0; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + double r = nad_tgeo_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTgeoStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "NadTgeoStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return NadTgeoStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..1268cf460d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTgeoTgeoPhysicalFunction::NadTgeoTgeoPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal NadTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return nad_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "NadTgeoTgeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return NadTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTintTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTintTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..4e615808c2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTintTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTintTboxPhysicalFunction::NadTintTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTintTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0; } + int r = nad_tint_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTintTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "NadTintTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return NadTintTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTnpointGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTnpointGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..deaa9418e7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTnpointGeoPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +NadTnpointGeoPhysicalFunction::NadTnpointGeoPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTnpointGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = nad_tnpoint_geo(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTnpointGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "NadTnpointGeoPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return NadTnpointGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTnpointNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTnpointNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..69aa55b2d8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTnpointNpointPhysicalFunction.cpp @@ -0,0 +1,112 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTnpointNpointPhysicalFunction::NadTnpointNpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); +} + +VarVal NadTnpointNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + + double r = nad_tnpoint_npoint(temp, np0); + free(temp); + free(np0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTnpointNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "NadTnpointNpointPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return NadTnpointNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTnpointStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTnpointStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..58d132804d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTnpointStboxPhysicalFunction.cpp @@ -0,0 +1,111 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +NadTnpointStboxPhysicalFunction::NadTnpointStboxPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTnpointStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = nad_tnpoint_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTnpointStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "NadTnpointStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return NadTnpointStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTnpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTnpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..2be6a1ed47 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTnpointTnpointPhysicalFunction.cpp @@ -0,0 +1,120 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTnpointTnpointPhysicalFunction::NadTnpointTnpointPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction, + PhysicalFunction rid0Function, + PhysicalFunction frac0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(rid0Function)); + parameterFunctions.push_back(std::move(frac0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal NadTnpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto rid0 = parameterValues[3].cast>(); + auto frac0 = parameterValues[4].cast>(); + auto ts0 = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts, + uint64_t rid0, + double frac0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + Npoint* np0 = npoint_make((int64_t)rid0, frac0); + if (!np0) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tnpointinst_make(np0, (TimestampTz)ts0); + free(np0); + if (!inst0) { free(temp); return 0.0; } + + double r = nad_tnpoint_tnpoint(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts, rid0, frac0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTnpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "NadTnpointTnpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return NadTnpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTposeGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTposeGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..4538f8f4ab --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTposeGeoPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +NadTposeGeoPhysicalFunction::NadTposeGeoPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTposeGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto arg0 = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + GSERIALIZED* gs0 = geom_in(arg0S.c_str(), -1); + if (!gs0) { free(temp); return 0.0; } + + double r = nad_tpose_geo(temp, gs0); + free(temp); + free(gs0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTposeGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "NadTposeGeoPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return NadTposeGeoPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTposePosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTposePosePhysicalFunction.cpp new file mode 100644 index 0000000000..b8a9e17b72 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTposePosePhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +NadTposePosePhysicalFunction::NadTposePosePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); +} + +VarVal NadTposePosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0 = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0) { free(temp); return 0.0; } + + double r = nad_tpose_pose(temp, pose0); + free(temp); + free(pose0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTposePosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "NadTposePosePhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return NadTposePosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTposeStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTposeStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..299f46b497 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTposeStboxPhysicalFunction.cpp @@ -0,0 +1,115 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +NadTposeStboxPhysicalFunction::NadTposeStboxPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal NadTposeStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto arg0 = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0.0; } + + double r = nad_tpose_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTposeStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "NadTposeStboxPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return NadTposeStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTposeTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTposeTposePhysicalFunction.cpp new file mode 100644 index 0000000000..6f6e168126 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTposeTposePhysicalFunction.cpp @@ -0,0 +1,129 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +NadTposeTposePhysicalFunction::NadTposeTposePhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction tsFunction, + PhysicalFunction px0Function, + PhysicalFunction py0Function, + PhysicalFunction ptheta0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(px0Function)); + parameterFunctions.push_back(std::move(py0Function)); + parameterFunctions.push_back(std::move(ptheta0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal NadTposeTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + auto px0 = parameterValues[4].cast>(); + auto py0 = parameterValues[5].cast>(); + auto ptheta0 = parameterValues[6].cast>(); + auto ts0 = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double x, + double y, + double theta, + uint64_t ts, + double px0, + double py0, + double ptheta0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("Pose(Point({} {}),{})@{}", x, y, theta, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tpose_in(tempWkt.c_str()); + if (!temp) return 0.0; + Pose* pose0A = pose_make_2d(px0, py0, ptheta0, false, 0); + if (!pose0A) { free(temp); return 0.0; } + Temporal* inst0 = (Temporal*)tposeinst_make(pose0A, (TimestampTz)ts0); + free(pose0A); + if (!inst0) { free(temp); return 0.0; } + + double r = nad_tpose_tpose(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + x, y, theta, ts, px0, py0, ptheta0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTposeTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "NadTposeTposePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return NadTposeTposePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTrgeometryGeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTrgeometryGeoPhysicalFunction.cpp new file mode 100644 index 0000000000..850aa84dd8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTrgeometryGeoPhysicalFunction.cpp @@ -0,0 +1,98 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +NadTrgeometryGeoPhysicalFunction::NadTrgeometryGeoPhysicalFunction(PhysicalFunction ref_wkt, PhysicalFunction x, PhysicalFunction y, PhysicalFunction theta, PhysicalFunction ts, PhysicalFunction tgt_wkt) +{ + paramFns.reserve(6); + paramFns.push_back(std::move(ref_wkt)); + paramFns.push_back(std::move(x)); + paramFns.push_back(std::move(y)); + paramFns.push_back(std::move(theta)); + paramFns.push_back(std::move(ts)); + paramFns.push_back(std::move(tgt_wkt)); +} + +VarVal NadTrgeometryGeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref_wkt = paramFns[0].execute(record, arena); + auto x = paramFns[1].execute(record, arena).cast(); + auto y = paramFns[2].execute(record, arena).cast(); + auto theta = paramFns[3].execute(record, arena).cast(); + auto ts = paramFns[4].execute(record, arena).cast(); + auto tgt_wkt = paramFns[5].execute(record, arena); + const auto result = nautilus::invoke( + +[](const char* ref_wkt, uint32_t ref_len, double x, double y, double theta, uint64_t ts, const char* tgt_wkt, uint32_t tgt_len) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* ref_str = (char*)malloc(ref_len + 1); + memcpy(ref_str, ref_wkt, ref_len); ref_str[ref_len] = '\0'; + GSERIALIZED* gs_ref = geom_in(ref_str, -1); free(ref_str); + if (!gs_ref) return 0.0; + Pose* pose = pose_make_2d(x, y, theta, false, 0); + if (!pose) { free(gs_ref); return 0.0; } + TInstant* inst = trgeoinst_make(gs_ref, pose, (TimestampTz)ts); + free(gs_ref); free(pose); + if (!inst) return 0.0; + char* tgt_str = (char*)malloc(tgt_len + 1); + memcpy(tgt_str, tgt_wkt, tgt_len); tgt_str[tgt_len] = '\0'; + GSERIALIZED* gs_tgt = geom_in(tgt_str, -1); free(tgt_str); + if (!gs_tgt) { free(inst); return 0.0; } + double r = nad_trgeometry_geo((Temporal*)inst, gs_tgt); + free(inst); free(gs_tgt); + return r; + } catch (const std::exception&) { return 0.0; } + }, + ref_wkt, x, y, theta, ts, tgt_wkt); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTrgeometryGeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "NadTrgeometryGeoPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + return NadTrgeometryGeoPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..8c0647504c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/NadTrgeometryTrgeometryPhysicalFunction.cpp @@ -0,0 +1,115 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +#include +} + +namespace NES { + +NadTrgeometryTrgeometryPhysicalFunction::NadTrgeometryTrgeometryPhysicalFunction(PhysicalFunction ref1_wkt, PhysicalFunction x1, PhysicalFunction y1, PhysicalFunction theta1, PhysicalFunction ts1, PhysicalFunction ref2_wkt, PhysicalFunction x2, PhysicalFunction y2, PhysicalFunction theta2, PhysicalFunction ts2) +{ + paramFns.reserve(10); + paramFns.push_back(std::move(ref1_wkt)); + paramFns.push_back(std::move(x1)); + paramFns.push_back(std::move(y1)); + paramFns.push_back(std::move(theta1)); + paramFns.push_back(std::move(ts1)); + paramFns.push_back(std::move(ref2_wkt)); + paramFns.push_back(std::move(x2)); + paramFns.push_back(std::move(y2)); + paramFns.push_back(std::move(theta2)); + paramFns.push_back(std::move(ts2)); +} + +VarVal NadTrgeometryTrgeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + auto ref1_wkt = paramFns[0].execute(record, arena); + auto x1 = paramFns[1].execute(record, arena).cast(); + auto y1 = paramFns[2].execute(record, arena).cast(); + auto theta1 = paramFns[3].execute(record, arena).cast(); + auto ts1 = paramFns[4].execute(record, arena).cast(); + auto ref2_wkt = paramFns[5].execute(record, arena); + auto x2 = paramFns[6].execute(record, arena).cast(); + auto y2 = paramFns[7].execute(record, arena).cast(); + auto theta2 = paramFns[8].execute(record, arena).cast(); + auto ts2 = paramFns[9].execute(record, arena).cast(); + const auto result = nautilus::invoke( + +[](const char* ref1_wkt, uint32_t ref1_len, double x1, double y1, double theta1, uint64_t ts1, const char* ref2_wkt, uint32_t ref2_len, double x2, double y2, double theta2, uint64_t ts2) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + char* s1 = (char*)malloc(ref1_len + 1); + memcpy(s1, ref1_wkt, ref1_len); s1[ref1_len] = '\0'; + GSERIALIZED* gs1 = geom_in(s1, -1); free(s1); + if (!gs1) return 0.0; + Pose* p1 = pose_make_2d(x1, y1, theta1, false, 0); + if (!p1) { free(gs1); return 0.0; } + TInstant* inst1 = trgeoinst_make(gs1, p1, (TimestampTz)ts1); + free(gs1); free(p1); + if (!inst1) return 0.0; + char* s2 = (char*)malloc(ref2_len + 1); + memcpy(s2, ref2_wkt, ref2_len); s2[ref2_len] = '\0'; + GSERIALIZED* gs2 = geom_in(s2, -1); free(s2); + if (!gs2) { free(inst1); return 0.0; } + Pose* p2 = pose_make_2d(x2, y2, theta2, false, 0); + if (!p2) { free(inst1); free(gs2); return 0.0; } + TInstant* inst2 = trgeoinst_make(gs2, p2, (TimestampTz)ts2); + free(gs2); free(p2); + if (!inst2) { free(inst1); return 0.0; } + double r = nad_trgeometry_trgeometry((Temporal*)inst1, (Temporal*)inst2); + free(inst1); free(inst2); + return r; + } catch (const std::exception&) { return 0.0; } + }, + ref1_wkt, x1, y1, theta1, ts1, ref2_wkt, x2, y2, theta2, ts2); + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterNadTrgeometryTrgeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 10, + "NadTrgeometryTrgeometryPhysicalFunction requires 10 children but got {}", + arguments.childFunctions.size()); + return NadTrgeometryTrgeometryPhysicalFunction( + std::move(arguments.childFunctions[0]), + std::move(arguments.childFunctions[1]), + std::move(arguments.childFunctions[2]), + std::move(arguments.childFunctions[3]), + std::move(arguments.childFunctions[4]), + std::move(arguments.childFunctions[5]), + std::move(arguments.childFunctions[6]), + std::move(arguments.childFunctions[7]), + std::move(arguments.childFunctions[8]), + std::move(arguments.childFunctions[9])); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OveraboveStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OveraboveStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..b85caf6b51 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OveraboveStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OveraboveStboxStboxPhysicalFunction::OveraboveStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OveraboveStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overabove_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOveraboveStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OveraboveStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OveraboveStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..aa27d510dd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OveraboveStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OveraboveStboxTspatialPhysicalFunction::OveraboveStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OveraboveStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overabove_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOveraboveStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OveraboveStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OveraboveStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..ee7b47dba6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OveraboveTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OveraboveTspatialStboxPhysicalFunction::OveraboveTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OveraboveTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overabove_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOveraboveTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OveraboveTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OveraboveTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..2352f919d8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OveraboveTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OveraboveTspatialTspatialPhysicalFunction::OveraboveTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OveraboveTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overabove_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOveraboveTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OveraboveTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OveraboveTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..4c5f86cbcd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterStboxStboxPhysicalFunction::OverafterStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverafterStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overafter_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverafterStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverafterStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..a0e02728f5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterStboxTspatialPhysicalFunction::OverafterStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverafterStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overafter_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverafterStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverafterStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..c10798af56 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterTboxTnumberPhysicalFunction::OverafterTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverafterTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overafter_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverafterTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverafterTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..ef5f6b8f52 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterTemporalTemporalPhysicalFunction::OverafterTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverafterTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overafter_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverafterTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverafterTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..c39cd4c990 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterTnumberTboxPhysicalFunction::OverafterTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverafterTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overafter_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverafterTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverafterTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..c4d2e7147d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterTnumberTnumberPhysicalFunction::OverafterTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverafterTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = overafter_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverafterTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverafterTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..d7132cf6d9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterTspatialStboxPhysicalFunction::OverafterTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverafterTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overafter_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverafterTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverafterTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..073999dbc6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverafterTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverafterTspatialTspatialPhysicalFunction::OverafterTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverafterTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overafter_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverafterTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverafterTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverafterTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbackStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbackStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..17e9a79f64 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbackStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbackStboxStboxPhysicalFunction::OverbackStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbackStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overback_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbackStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverbackStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverbackStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbackStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbackStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..5f0e9bd441 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbackStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbackStboxTspatialPhysicalFunction::OverbackStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbackStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overback_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbackStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverbackStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverbackStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbackTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbackTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..3940ad95b2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbackTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbackTspatialStboxPhysicalFunction::OverbackTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbackTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overback_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbackTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverbackTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverbackTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..9cfd611568 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbackTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbackTspatialTspatialPhysicalFunction::OverbackTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverbackTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overback_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbackTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverbackTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverbackTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..210e1ce82a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeStboxStboxPhysicalFunction::OverbeforeStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbeforeStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbefore_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverbeforeStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverbeforeStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..9c82cb3a2e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeStboxTspatialPhysicalFunction::OverbeforeStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbeforeStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbefore_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverbeforeStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverbeforeStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..c9fc038bec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeTboxTnumberPhysicalFunction::OverbeforeTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbeforeTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbefore_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverbeforeTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverbeforeTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..7efcc791aa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeTemporalTemporalPhysicalFunction::OverbeforeTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverbeforeTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overbefore_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverbeforeTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverbeforeTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..74231a182e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeTnumberTboxPhysicalFunction::OverbeforeTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbeforeTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbefore_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverbeforeTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverbeforeTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..6ab604fa1b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeTnumberTnumberPhysicalFunction::OverbeforeTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbeforeTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = overbefore_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverbeforeTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverbeforeTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..078f0dae16 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeTspatialStboxPhysicalFunction::OverbeforeTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbeforeTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbefore_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverbeforeTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverbeforeTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..f48ba77e85 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbeforeTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbeforeTspatialTspatialPhysicalFunction::OverbeforeTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverbeforeTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overbefore_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbeforeTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverbeforeTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverbeforeTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbelowStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbelowStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..57d1781295 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbelowStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbelowStboxStboxPhysicalFunction::OverbelowStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbelowStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbelow_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbelowStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverbelowStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverbelowStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..3ea1cf6e51 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbelowStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbelowStboxTspatialPhysicalFunction::OverbelowStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbelowStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbelow_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbelowStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverbelowStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverbelowStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..ba4c05c1f7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbelowTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbelowTspatialStboxPhysicalFunction::OverbelowTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverbelowTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overbelow_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbelowTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverbelowTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverbelowTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..18c70bb4b1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverbelowTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverbelowTspatialTspatialPhysicalFunction::OverbelowTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverbelowTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overbelow_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverbelowTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverbelowTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverbelowTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverfrontStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverfrontStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..9d2c471cf2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverfrontStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverfrontStboxStboxPhysicalFunction::OverfrontStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverfrontStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overfront_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverfrontStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverfrontStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverfrontStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..bff3fadcda --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverfrontStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverfrontStboxTspatialPhysicalFunction::OverfrontStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverfrontStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overfront_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverfrontStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverfrontStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverfrontStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..6464d90113 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverfrontTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverfrontTspatialStboxPhysicalFunction::OverfrontTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverfrontTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overfront_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverfrontTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverfrontTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverfrontTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..c5638f6559 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverfrontTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverfrontTspatialTspatialPhysicalFunction::OverfrontTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverfrontTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overfront_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverfrontTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverfrontTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverfrontTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..8710afcb6a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsStboxStboxPhysicalFunction::OverlapsStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverlapsStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overlaps_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverlapsStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverlapsStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..7031c5c202 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsStboxTspatialPhysicalFunction::OverlapsStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverlapsStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overlaps_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverlapsStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverlapsStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..a796c68b53 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsTboxTnumberPhysicalFunction::OverlapsTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverlapsTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overlaps_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverlapsTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverlapsTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..bdd626a6c0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsTemporalTemporalPhysicalFunction::OverlapsTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverlapsTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overlaps_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverlapsTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverlapsTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..d8d70196ec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsTnumberTboxPhysicalFunction::OverlapsTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverlapsTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overlaps_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverlapsTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverlapsTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..9b09ce8679 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsTnumberTnumberPhysicalFunction::OverlapsTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverlapsTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = overlaps_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverlapsTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverlapsTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..58450958af --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsTspatialStboxPhysicalFunction::OverlapsTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverlapsTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overlaps_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverlapsTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverlapsTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..0637a7f944 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverlapsTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverlapsTspatialTspatialPhysicalFunction::OverlapsTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverlapsTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overlaps_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverlapsTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverlapsTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverlapsTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..a622c0367c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftStboxStboxPhysicalFunction::OverleftStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverleftStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overleft_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverleftStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverleftStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..25ec22d809 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftStboxTspatialPhysicalFunction::OverleftStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverleftStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overleft_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverleftStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverleftStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..3c5df74f20 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftTboxTnumberPhysicalFunction::OverleftTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverleftTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overleft_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverleftTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverleftTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..e810058f9c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftTnumberTboxPhysicalFunction::OverleftTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverleftTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overleft_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverleftTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverleftTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..a507f131a8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftTnumberTnumberPhysicalFunction::OverleftTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverleftTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = overleft_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverleftTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverleftTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..c725c27cbf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftTspatialStboxPhysicalFunction::OverleftTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverleftTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overleft_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverleftTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverleftTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..902bb6ce3b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverleftTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverleftTspatialTspatialPhysicalFunction::OverleftTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverleftTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overleft_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverleftTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverleftTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverleftTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..c225a0f5d7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightStboxStboxPhysicalFunction::OverrightStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverrightStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overright_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverrightStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverrightStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..11084f422e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightStboxTspatialPhysicalFunction::OverrightStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverrightStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overright_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverrightStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverrightStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..335d4247ad --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightTboxTnumberPhysicalFunction::OverrightTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverrightTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overright_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverrightTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverrightTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..17f8ea79a6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightTnumberTboxPhysicalFunction::OverrightTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverrightTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overright_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "OverrightTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return OverrightTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..dc9a9d3998 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightTnumberTnumberPhysicalFunction::OverrightTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverrightTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = overright_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "OverrightTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return OverrightTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..60ec6b00ae --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightTspatialStboxPhysicalFunction::OverrightTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal OverrightTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = overright_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "OverrightTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return OverrightTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..f40ef249c1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/OverrightTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +OverrightTspatialTspatialPhysicalFunction::OverrightTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal OverrightTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return overright_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterOverrightTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "OverrightTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return OverrightTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinCellAreaPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinCellAreaPhysicalFunction.cpp new file mode 100644 index 0000000000..a9054cd004 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinCellAreaPhysicalFunction.cpp @@ -0,0 +1,84 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinCellAreaPhysicalFunction::QuadbinCellAreaPhysicalFunction(PhysicalFunction cellFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(cellFunction)); +} + +VarVal QuadbinCellAreaPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_cell_area((Quadbin)cell); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinCellAreaPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "QuadbinCellAreaPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return QuadbinCellAreaPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinCellToParentPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinCellToParentPhysicalFunction.cpp new file mode 100644 index 0000000000..dd4ee73359 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinCellToParentPhysicalFunction.cpp @@ -0,0 +1,102 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinCellToParentPhysicalFunction::QuadbinCellToParentPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction resFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(resFunction)); +} + +VarVal QuadbinCellToParentPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto res = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + uint64_t res, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + Quadbin qcell = quadbin_cell_to_parent((Quadbin)cell, (uint32_t)res); + char* qstr = quadbin_index_to_string(qcell); + if (!qstr) return 0u; + uint32_t len = static_cast(strlen(qstr)); + if (len > bufMax) len = bufMax; + memcpy(buf, qstr, len); + free(qstr); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, res, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinCellToParentPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinCellToParentPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinCellToParentPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.cpp new file mode 100644 index 0000000000..e0fbfc1382 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinCellToQuadkeyPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinCellToQuadkeyPhysicalFunction::QuadbinCellToQuadkeyPhysicalFunction(PhysicalFunction cellFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(cellFunction)); +} + +VarVal QuadbinCellToQuadkeyPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + char* out = quadbin_cell_to_quadkey((Quadbin)cell); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinCellToQuadkeyPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "QuadbinCellToQuadkeyPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return QuadbinCellToQuadkeyPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinCmpPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinCmpPhysicalFunction.cpp new file mode 100644 index 0000000000..3fc15db52f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinCmpPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinCmpPhysicalFunction::QuadbinCmpPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinCmpPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_cmp((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinCmpPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinCmpPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinCmpPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinEqPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinEqPhysicalFunction.cpp new file mode 100644 index 0000000000..fecfd26dce --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinEqPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinEqPhysicalFunction::QuadbinEqPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinEqPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_eq((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinEqPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinEqPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinEqPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinGePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinGePhysicalFunction.cpp new file mode 100644 index 0000000000..c730703056 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinGePhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinGePhysicalFunction::QuadbinGePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinGePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_ge((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinGePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinGePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinGePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinGetResolutionPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinGetResolutionPhysicalFunction.cpp new file mode 100644 index 0000000000..3c0a0038f2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinGetResolutionPhysicalFunction.cpp @@ -0,0 +1,84 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinGetResolutionPhysicalFunction::QuadbinGetResolutionPhysicalFunction(PhysicalFunction cellFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(cellFunction)); +} + +VarVal QuadbinGetResolutionPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_get_resolution((Quadbin)cell); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinGetResolutionPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "QuadbinGetResolutionPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return QuadbinGetResolutionPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinGtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinGtPhysicalFunction.cpp new file mode 100644 index 0000000000..5f163b430a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinGtPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinGtPhysicalFunction::QuadbinGtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinGtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_gt((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinGtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinGtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinGtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinIsValidCellPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinIsValidCellPhysicalFunction.cpp new file mode 100644 index 0000000000..a46e6b163a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinIsValidCellPhysicalFunction.cpp @@ -0,0 +1,84 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinIsValidCellPhysicalFunction::QuadbinIsValidCellPhysicalFunction(PhysicalFunction cellFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(cellFunction)); +} + +VarVal QuadbinIsValidCellPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_is_valid_cell((Quadbin)cell); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinIsValidCellPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "QuadbinIsValidCellPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return QuadbinIsValidCellPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinLePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinLePhysicalFunction.cpp new file mode 100644 index 0000000000..28d51f6789 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinLePhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinLePhysicalFunction::QuadbinLePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinLePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_le((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinLePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinLePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinLePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinLtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinLtPhysicalFunction.cpp new file mode 100644 index 0000000000..077c6bd3aa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinLtPhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinLtPhysicalFunction::QuadbinLtPhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinLtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_lt((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinLtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinLtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinLtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinNePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinNePhysicalFunction.cpp new file mode 100644 index 0000000000..8831df9e2d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinNePhysicalFunction.cpp @@ -0,0 +1,89 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinNePhysicalFunction::QuadbinNePhysicalFunction(PhysicalFunction aFunction, + PhysicalFunction bFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(aFunction)); + parameterFunctions.push_back(std::move(bFunction)); +} + +VarVal QuadbinNePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto a = parameterValues[0].cast>(); + auto b = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t a, + uint64_t b) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + double r = quadbin_ne((Quadbin)a, (Quadbin)b); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + a, b); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinNePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "QuadbinNePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return QuadbinNePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinPointToCellPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinPointToCellPhysicalFunction.cpp new file mode 100644 index 0000000000..3a951eb77f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinPointToCellPhysicalFunction.cpp @@ -0,0 +1,107 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinPointToCellPhysicalFunction::QuadbinPointToCellPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction resFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(resFunction)); +} + +VarVal QuadbinPointToCellPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto res = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](double lon, + double lat, + uint64_t res, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + Quadbin qcell = quadbin_point_to_cell(lon, lat, (uint32_t)res); + char* qstr = quadbin_index_to_string(qcell); + if (!qstr) return 0u; + uint32_t len = static_cast(strlen(qstr)); + if (len > bufMax) len = bufMax; + memcpy(buf, qstr, len); + free(qstr); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + lon, lat, res, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinPointToCellPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "QuadbinPointToCellPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return QuadbinPointToCellPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/QuadbinTileToCellPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/QuadbinTileToCellPhysicalFunction.cpp new file mode 100644 index 0000000000..b515dfe42f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/QuadbinTileToCellPhysicalFunction.cpp @@ -0,0 +1,107 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +QuadbinTileToCellPhysicalFunction::QuadbinTileToCellPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction zFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(zFunction)); +} + +VarVal QuadbinTileToCellPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto z = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t x, + uint64_t y, + uint64_t z, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + + Quadbin qcell = quadbin_tile_to_cell((uint32_t)x, (uint32_t)y, (uint32_t)z); + char* qstr = quadbin_index_to_string(qcell); + if (!qstr) return 0u; + uint32_t len = static_cast(strlen(qstr)); + if (len > bufMax) len = bufMax; + memcpy(buf, qstr, len); + free(qstr); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + x, y, z, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterQuadbinTileToCellPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "QuadbinTileToCellPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return QuadbinTileToCellPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..d630c27d14 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightStboxStboxPhysicalFunction::RightStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal RightStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = right_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "RightStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return RightStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..1d6708ab13 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightStboxTspatialPhysicalFunction::RightStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal RightStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = right_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "RightStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return RightStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..9c9706bfb1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightTboxTnumberPhysicalFunction::RightTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal RightTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = right_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "RightTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return RightTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..830ef10e16 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightTnumberTboxPhysicalFunction::RightTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal RightTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = right_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "RightTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return RightTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..faff4f4b67 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightTnumberTnumberPhysicalFunction::RightTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal RightTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = right_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "RightTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return RightTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..f51a4ee952 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightTspatialStboxPhysicalFunction::RightTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal RightTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = right_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "RightTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return RightTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/RightTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/RightTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..deb91bd494 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/RightTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +RightTspatialTspatialPhysicalFunction::RightTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal RightTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return right_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterRightTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "RightTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return RightTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameStboxStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameStboxStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..951b30ce30 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameStboxStboxPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameStboxStboxPhysicalFunction::SameStboxStboxPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SameStboxStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = same_stbox_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameStboxStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "SameStboxStboxPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return SameStboxStboxPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameStboxTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameStboxTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..7caa4c0f7f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameStboxTspatialPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameStboxTspatialPhysicalFunction::SameStboxTspatialPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SameStboxTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = same_stbox_tspatial(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameStboxTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "SameStboxTspatialPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return SameStboxTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameTboxTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameTboxTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..24b8c32ea9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameTboxTnumberPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameTboxTnumberPhysicalFunction::SameTboxTnumberPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SameTboxTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = same_tbox_tnumber(arg0B, temp); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameTboxTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SameTboxTnumberPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SameTboxTnumberPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameTemporalTemporalPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameTemporalTemporalPhysicalFunction.cpp new file mode 100644 index 0000000000..c237648ef0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameTemporalTemporalPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameTemporalTemporalPhysicalFunction::SameTemporalTemporalPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal SameTemporalTemporalPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return same_temporal_temporal(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameTemporalTemporalPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "SameTemporalTemporalPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return SameTemporalTemporalPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameTnumberTboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameTnumberTboxPhysicalFunction.cpp new file mode 100644 index 0000000000..16ed4bc58e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameTnumberTboxPhysicalFunction.cpp @@ -0,0 +1,103 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameTnumberTboxPhysicalFunction::SameTnumberTboxPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SameTnumberTboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + TBox* arg0B = tbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = same_tnumber_tbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameTnumberTboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SameTnumberTboxPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SameTnumberTboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..78b0aa4519 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameTnumberTnumberPhysicalFunction::SameTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SameTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return false; + std::string arg0Hex(arg0Ptr, arg0Size); + Temporal* arg0T = temporal_from_hexwkb(arg0Hex.c_str()); + if (!arg0T) { free(temp); return false; } + bool r = same_tnumber_tnumber(temp, arg0T); + free(temp); + free(arg0T); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "SameTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return SameTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameTspatialStboxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameTspatialStboxPhysicalFunction.cpp new file mode 100644 index 0000000000..814fbf826f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameTspatialStboxPhysicalFunction.cpp @@ -0,0 +1,109 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameTspatialStboxPhysicalFunction::SameTspatialStboxPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SameTspatialStboxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + auto arg0 = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0)) return false; + std::string tempWkt = fmt::format("SRID=4326;Point({} {})@{}", lon, lat, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tgeompoint_in(tempWkt.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = same_tspatial_stbox(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + lon, lat, ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameTspatialStboxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "SameTspatialStboxPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return SameTspatialStboxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SameTspatialTspatialPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SameTspatialTspatialPhysicalFunction.cpp new file mode 100644 index 0000000000..ca3267ab82 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SameTspatialTspatialPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SameTspatialTspatialPhysicalFunction::SameTspatialTspatialPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal SameTspatialTspatialPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return same_tspatial_tspatial(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSameTspatialTspatialPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "SameTspatialTspatialPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return SameTspatialTspatialPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxCmpPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxCmpPhysicalFunction.cpp new file mode 100644 index 0000000000..4410c75116 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxCmpPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxCmpPhysicalFunction::StboxCmpPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxCmpPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return 0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return 0; } + int r = stbox_cmp(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxCmpPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxCmpPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxCmpPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxEqPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxEqPhysicalFunction.cpp new file mode 100644 index 0000000000..6a22b07dfa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxEqPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxEqPhysicalFunction::StboxEqPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxEqPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = stbox_eq(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxEqPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxEqPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxEqPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxGePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxGePhysicalFunction.cpp new file mode 100644 index 0000000000..ef087a3cad --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxGePhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxGePhysicalFunction::StboxGePhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxGePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = stbox_ge(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxGePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxGePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxGePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxGtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxGtPhysicalFunction.cpp new file mode 100644 index 0000000000..ff3216a14b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxGtPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxGtPhysicalFunction::StboxGtPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxGtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = stbox_gt(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxGtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxGtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxGtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxLePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxLePhysicalFunction.cpp new file mode 100644 index 0000000000..d1d7b9e51b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxLePhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxLePhysicalFunction::StboxLePhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxLePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = stbox_le(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxLePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxLePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxLePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxLtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxLtPhysicalFunction.cpp new file mode 100644 index 0000000000..ee8e69565f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxLtPhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxLtPhysicalFunction::StboxLtPhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxLtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = stbox_lt(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxLtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxLtPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxLtPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/StboxNePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/StboxNePhysicalFunction.cpp new file mode 100644 index 0000000000..03a9a56657 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/StboxNePhysicalFunction.cpp @@ -0,0 +1,100 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +StboxNePhysicalFunction::StboxNePhysicalFunction(PhysicalFunction boxFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(boxFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal StboxNePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto box = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + const auto result = nautilus::invoke( + +[](const char* boxPtr, uint32_t boxSize, + const char* arg0Ptr, uint32_t arg0Size) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempS(boxPtr, boxSize); + while (!tempS.empty() && (tempS.front()=='\'' || tempS.front()=='"')) tempS.erase(tempS.begin()); + while (!tempS.empty() && (tempS.back()=='\'' || tempS.back()=='"')) tempS.pop_back(); + STBox* temp = stbox_in(tempS.c_str()); + if (!temp) return false; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front()=='\'' || arg0S.front()=='"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back()=='\'' || arg0S.back()=='"')) arg0S.pop_back(); + STBox* arg0B = stbox_in(arg0S.c_str()); + if (!arg0B) { free(temp); return false; } + bool r = stbox_ne(temp, arg0B); + free(temp); + free(arg0B); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + box.getContent(), box.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterStboxNePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "StboxNePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return StboxNePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubBigintTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubBigintTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..aa57db448b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubBigintTbigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubBigintTbigintPhysicalFunction::SubBigintTbigintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal SubBigintTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = sub_bigint_tbigint(static_cast(arg0), temp); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubBigintTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SubBigintTbigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SubBigintTbigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubFloatTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubFloatTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..db5f8fde12 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubFloatTfloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubFloatTfloatPhysicalFunction::SubFloatTfloatPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal SubFloatTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = sub_float_tfloat(arg0, temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubFloatTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SubFloatTfloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SubFloatTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubIntTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubIntTintPhysicalFunction.cpp new file mode 100644 index 0000000000..1a235dc2fe --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubIntTintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubIntTintPhysicalFunction::SubIntTintPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal SubIntTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t arg0, + int32_t value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = sub_int_tint(arg0, temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubIntTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SubIntTintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SubIntTintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubTbigintBigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubTbigintBigintPhysicalFunction.cpp new file mode 100644 index 0000000000..68815b66cd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubTbigintBigintPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubTbigintBigintPhysicalFunction::SubTbigintBigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SubTbigintBigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = sub_tbigint_bigint(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubTbigintBigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SubTbigintBigintPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SubTbigintBigintPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..946478c58e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubTfloatFloatPhysicalFunction::SubTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SubTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = sub_tfloat_float(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SubTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SubTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..ef184b3853 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubTintIntPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubTintIntPhysicalFunction::SubTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SubTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = sub_tint_int(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "SubTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return SubTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/SubTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/SubTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..23e072d343 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/SubTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +SubTnumberTnumberPhysicalFunction::SubTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal SubTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = sub_tnumber_tnumber(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterSubTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "SubTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return SubTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TEqTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TEqTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..887d00a3f0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TEqTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TEqTextTtextPhysicalFunction::TEqTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TEqTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = teq_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTEqTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TEqTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TEqTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TEqTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TEqTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..48e65ff53b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TEqTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TEqTtextTextPhysicalFunction::TEqTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TEqTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = teq_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTEqTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TEqTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TEqTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TGeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TGeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..27da35d74b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TGeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TGeTextTtextPhysicalFunction::TGeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TGeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tge_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTGeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TGeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TGeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TGeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TGeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..945ffd0c97 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TGeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TGeTtextTextPhysicalFunction::TGeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TGeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tge_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTGeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TGeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TGeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TGtTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TGtTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..b514af30e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TGtTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TGtTextTtextPhysicalFunction::TGtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TGtTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tgt_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTGtTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TGtTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TGtTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TGtTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TGtTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..722d05c597 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TGtTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TGtTtextTextPhysicalFunction::TGtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TGtTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tgt_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTGtTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TGtTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TGtTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TLeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TLeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..d6cdf8e16f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TLeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TLeTextTtextPhysicalFunction::TLeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TLeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tle_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTLeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TLeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TLeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TLeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TLeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..024e4fdaef --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TLeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TLeTtextTextPhysicalFunction::TLeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TLeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tle_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTLeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TLeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TLeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TLtTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TLtTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..2991bd7e90 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TLtTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TLtTextTtextPhysicalFunction::TLtTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TLtTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tlt_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTLtTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TLtTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TLtTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TLtTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TLtTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..4ae06764cd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TLtTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TLtTtextTextPhysicalFunction::TLtTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TLtTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tlt_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTLtTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TLtTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TLtTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TNeTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TNeTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..fe957929e7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TNeTextTtextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TNeTextTtextPhysicalFunction::TNeTextTtextPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TNeTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast(); + auto value = parameterValues[1].cast(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](const char* arg0Ptr, uint32_t arg0Size, + const char* valuePtr, uint32_t valueSize, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tne_text_ttext(txt0, temp); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + arg0.getContent(), arg0.getContentSize(), value.getContent(), value.getContentSize(), ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTNeTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TNeTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TNeTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TNeTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TNeTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..dd6c4b914f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TNeTtextTextPhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TNeTtextTextPhysicalFunction::TNeTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TNeTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + const auto result = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0.0; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0.0; } + + double r = tne_ttext_text(temp, txt0); + free(temp); + free(txt0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTNeTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TNeTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TNeTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TandBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TandBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..8f94a30a81 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TandBoolTboolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TandBoolTboolPhysicalFunction::TandBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TandBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tand_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTandBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TandBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TandBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TandTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TandTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..06066129fb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TandTboolBoolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TandTboolBoolPhysicalFunction::TandTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TandTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tand_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTandTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TandTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TandTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TandTboolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TandTboolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..dd6b92e60d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TandTboolTboolPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TandTboolTboolPhysicalFunction::TandTboolTboolPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TandTboolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tand_tbool_tbool(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTandTboolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TandTboolTboolPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TandTboolTboolPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TbigintScaleValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TbigintScaleValuePhysicalFunction.cpp new file mode 100644 index 0000000000..118e153230 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TbigintScaleValuePhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TbigintScaleValuePhysicalFunction::TbigintScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TbigintScaleValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tbigint_scale_value(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTbigintScaleValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TbigintScaleValuePhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TbigintScaleValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.cpp new file mode 100644 index 0000000000..942c2f2be3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TbigintShiftScaleValuePhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TbigintShiftScaleValuePhysicalFunction::TbigintShiftScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal TbigintShiftScaleValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + auto arg1 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0, + double arg1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tbigint_shift_scale_value(temp, static_cast(arg0), static_cast(arg1)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0, arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTbigintShiftScaleValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TbigintShiftScaleValuePhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TbigintShiftScaleValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TbigintShiftValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TbigintShiftValuePhysicalFunction.cpp new file mode 100644 index 0000000000..008c9db0f4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TbigintShiftValuePhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TbigintShiftValuePhysicalFunction::TbigintShiftValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TbigintShiftValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tbigint_shift_value(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTbigintShiftValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TbigintShiftValuePhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TbigintShiftValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TbigintToTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TbigintToTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..d760ecc657 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TbigintToTfloatPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TbigintToTfloatPhysicalFunction::TbigintToTfloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TbigintToTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tbigint_to_tfloat(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTbigintToTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TbigintToTfloatPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TbigintToTfloatPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TbigintToTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TbigintToTintPhysicalFunction.cpp new file mode 100644 index 0000000000..400b155459 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TbigintToTintPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TbigintToTintPhysicalFunction::TbigintToTintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TbigintToTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbigint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tbigint_to_tint(temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTbigintToTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TbigintToTintPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TbigintToTintPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TboolEndValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TboolEndValuePhysicalFunction.cpp new file mode 100644 index 0000000000..e09b5f5eba --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TboolEndValuePhysicalFunction.cpp @@ -0,0 +1,91 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TboolEndValuePhysicalFunction::TboolEndValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TboolEndValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](bool value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + bool r = tbool_end_value(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTboolEndValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TboolEndValuePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TboolEndValuePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TboolStartValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TboolStartValuePhysicalFunction.cpp new file mode 100644 index 0000000000..67705b3114 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TboolStartValuePhysicalFunction.cpp @@ -0,0 +1,91 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TboolStartValuePhysicalFunction::TboolStartValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TboolStartValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](bool value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + bool r = tbool_start_value(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTboolStartValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TboolStartValuePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TboolStartValuePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TboolToTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TboolToTintPhysicalFunction.cpp new file mode 100644 index 0000000000..dcb72c9e1e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TboolToTintPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TboolToTintPhysicalFunction::TboolToTintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TboolToTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tbool_to_tint(temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTboolToTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TboolToTintPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TboolToTintPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TcbufferToTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TcbufferToTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..ead7d1c882 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TcbufferToTfloatPhysicalFunction.cpp @@ -0,0 +1,107 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TcbufferToTfloatPhysicalFunction::TcbufferToTfloatPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TcbufferToTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto ts = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](double lon, + double lat, + double radius, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lon >= -180.0 && lon <= 180.0 && lat >= -90.0 && lat <= 90.0) || radius < 0.0) return 0.0; + std::string tempWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", lon, lat, radius, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tcbuffer_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tcbuffer_to_tfloat(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + lon, lat, radius, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTcbufferToTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TcbufferToTfloatPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TcbufferToTfloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..b5a948bb71 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TcontainsTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TcontainsTcbufferTcbufferPhysicalFunction::TcontainsTcbufferTcbufferPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TcontainsTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tcontains_tcbuffer_tcbuffer(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTcontainsTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TcontainsTcbufferTcbufferPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TcontainsTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..f2ab94a011 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TcontainsTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TcontainsTgeoTgeoPhysicalFunction::TcontainsTgeoTgeoPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TcontainsTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tcontains_tgeo_tgeo(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTcontainsTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TcontainsTgeoTgeoPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TcontainsTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..5a64db33aa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TcoversTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TcoversTcbufferTcbufferPhysicalFunction::TcoversTcbufferTcbufferPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TcoversTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tcovers_tcbuffer_tcbuffer(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTcoversTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TcoversTcbufferTcbufferPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TcoversTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..a913677574 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TcoversTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TcoversTgeoTgeoPhysicalFunction::TcoversTgeoTgeoPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TcoversTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tcovers_tgeo_tgeo(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTcoversTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TcoversTgeoTgeoPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TcoversTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..37d80fabad --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTcbufferTcbufferPhysicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TdistanceTcbufferTcbufferPhysicalFunction::TdistanceTcbufferTcbufferPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTcbufferTcbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tdistance_tcbuffer_tcbuffer(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTcbufferTcbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TdistanceTcbufferTcbufferPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TdistanceTcbufferTcbufferPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..cb18b54621 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTfloatFloatPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TdistanceTfloatFloatPhysicalFunction::TdistanceTfloatFloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTfloatFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tdistance_tfloat_float(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTfloatFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TdistanceTfloatFloatPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TdistanceTfloatFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.cpp new file mode 100644 index 0000000000..4ba4335771 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTgeoTgeoPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TdistanceTgeoTgeoPhysicalFunction::TdistanceTgeoTgeoPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTgeoTgeoPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tdistance_tgeo_tgeo(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTgeoTgeoPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TdistanceTgeoTgeoPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TdistanceTgeoTgeoPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTintIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTintIntPhysicalFunction.cpp new file mode 100644 index 0000000000..d54444943e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTintIntPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TdistanceTintIntPhysicalFunction::TdistanceTintIntPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTintIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tdistance_tint_int(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTintIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TdistanceTintIntPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TdistanceTintIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.cpp new file mode 100644 index 0000000000..04a0fd88ea --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTnpointTnpointPhysicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TdistanceTnpointTnpointPhysicalFunction::TdistanceTnpointTnpointPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTnpointTnpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tdistance_tnpoint_tnpoint(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTnpointTnpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TdistanceTnpointTnpointPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TdistanceTnpointTnpointPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.cpp new file mode 100644 index 0000000000..461770dec2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTnumberTnumberPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TdistanceTnumberTnumberPhysicalFunction::TdistanceTnumberTnumberPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTnumberTnumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tdistance_tnumber_tnumber(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTnumberTnumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TdistanceTnumberTnumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TdistanceTnumberTnumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TdistanceTposeTposePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TdistanceTposeTposePhysicalFunction.cpp new file mode 100644 index 0000000000..91f0fc61c5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TdistanceTposeTposePhysicalFunction.cpp @@ -0,0 +1,123 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TdistanceTposeTposePhysicalFunction::TdistanceTposeTposePhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TdistanceTposeTposePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tdistance_tpose_tpose(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTdistanceTposeTposePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TdistanceTposeTposePhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TdistanceTposeTposePhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..46dd387913 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAContainsGeometryPhysicalFunction::TemporalAContainsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAContainsGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return acontains_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalAContainsGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalAContainsGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..e183c59b47 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAContainsTCbufferCbufferPhysicalFunction::TemporalAContainsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalAContainsTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = acontains_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalAContainsTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalAContainsTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..a3b52dfb06 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAContainsTCbufferPhysicalFunction::TemporalAContainsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAContainsTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = acontains_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalAContainsTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalAContainsTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..b1f3aaa9da --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAContainsTGeometryPhysicalFunction::TemporalAContainsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAContainsTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return acontains_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalAContainsTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalAContainsTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..9117a27506 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAContainsTNpointGeometryPhysicalFunction::TemporalAContainsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAContainsTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = acontains_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalAContainsTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalAContainsTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..e347e885d8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAContainsTNpointTNpointPhysicalFunction::TemporalAContainsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAContainsTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = acontains_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalAContainsTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalAContainsTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..6cfcceb550 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAContainsTPoseGeometryPhysicalFunction::TemporalAContainsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAContainsTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = acontains_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalAContainsTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalAContainsTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..4c41e64de6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAContainsTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAContainsTPoseTPosePhysicalFunction::TemporalAContainsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAContainsTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = acontains_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAContainsTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalAContainsTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalAContainsTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..51b378fca2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalACoversTCbufferCbufferPhysicalFunction::TemporalACoversTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalACoversTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = acovers_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalACoversTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalACoversTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalACoversTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..2c4bc0dfd3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalACoversTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalACoversTCbufferPhysicalFunction::TemporalACoversTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalACoversTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = acovers_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalACoversTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalACoversTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalACoversTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..c7b624cae2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinGeometryPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADWithinGeometryPhysicalFunction::TemporalADWithinGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS *_tgeo_geo with trailing distance arg + // — int fn(const Temporal*, const GSERIALIZED*, double). + return adwithin_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalADWithinGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalADWithinGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..937682c787 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADWithinTCbufferCbufferPhysicalFunction::TemporalADWithinTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* cbufLitPtr, uint32_t cbufLitSize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = adwithin_tcbuffer_cbuffer(tcbuffer, cb, distValue); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalADWithinTCbufferCbufferPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalADWithinTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..38778bc42b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferGeometryPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADWithinTCbufferGeometryPhysicalFunction::TemporalADWithinTCbufferGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTCbufferGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = adwithin_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry(), distValue); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTCbufferGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalADWithinTCbufferGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalADWithinTCbufferGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..c309e7452d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,132 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADWithinTCbufferTCbufferPhysicalFunction::TemporalADWithinTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = adwithin_tcbuffer_tcbuffer(tA, tB, distValue); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "TemporalADWithinTCbufferTCbufferPhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return TemporalADWithinTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..7a77d53a0a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADWithinTGeometryPhysicalFunction::TemporalADWithinTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo with trailing distance arg + // — int fn(const Temporal*, const Temporal*, double). + return adwithin_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "TemporalADWithinTGeometryPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return TemporalADWithinTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..da99a247fc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADWithinTNpointGeometryPhysicalFunction::TemporalADWithinTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = adwithin_tgeo_geo(tgeo, staticGeometry.getGeometry(), distValue); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalADWithinTNpointGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalADWithinTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..3f2423f4dd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADWithinTNpointTNpointPhysicalFunction::TemporalADWithinTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = adwithin_tgeo_tgeo(tgeoA, tgeoB, distValue); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "TemporalADWithinTNpointTNpointPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return TemporalADWithinTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..a7a4aa8702 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADWithinTPoseGeometryPhysicalFunction::TemporalADWithinTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = adwithin_tgeo_geo(tgeo, staticGeometry.getGeometry(), distValue); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalADWithinTPoseGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalADWithinTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..988729ce54 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADWithinTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,141 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADWithinTPoseTPosePhysicalFunction::TemporalADWithinTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalADWithinTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = adwithin_tgeo_tgeo(tgeoA, tgeoB, distValue); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADWithinTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "TemporalADWithinTPoseTPosePhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return TemporalADWithinTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..98880a767c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADisjointGeometryPhysicalFunction::TemporalADisjointGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalADisjointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return adisjoint_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalADisjointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalADisjointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..747a7385e2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADisjointTCbufferCbufferPhysicalFunction::TemporalADisjointTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalADisjointTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = adisjoint_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalADisjointTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalADisjointTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..24aab94588 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADisjointTCbufferPhysicalFunction::TemporalADisjointTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalADisjointTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = adisjoint_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalADisjointTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalADisjointTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..7c51d596d4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADisjointTCbufferTCbufferPhysicalFunction::TemporalADisjointTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalADisjointTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = adisjoint_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalADisjointTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalADisjointTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..78da042055 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalADisjointTGeometryPhysicalFunction::TemporalADisjointTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalADisjointTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return adisjoint_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalADisjointTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalADisjointTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..dff22a4085 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADisjointTNpointGeometryPhysicalFunction::TemporalADisjointTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalADisjointTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = adisjoint_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalADisjointTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalADisjointTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..8a07cc2dfb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADisjointTNpointTNpointPhysicalFunction::TemporalADisjointTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalADisjointTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = adisjoint_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalADisjointTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalADisjointTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..c83756ca94 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADisjointTPoseGeometryPhysicalFunction::TemporalADisjointTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalADisjointTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = adisjoint_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalADisjointTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalADisjointTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..4c762fbfc1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalADisjointTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalADisjointTPoseTPosePhysicalFunction::TemporalADisjointTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalADisjointTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = adisjoint_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalADisjointTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalADisjointTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalADisjointTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.cpp index fbe573325c..17dcb67455 100644 --- a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.cpp +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsGeometryPhysicalFunction.cpp @@ -1,233 +1,124 @@ -#include -#include -#include -#include +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include + #include +#include #include #include #include +#include #include #include -#include -#include #include -#include -#include #include +#include +#include +#include + +extern "C" { +#include +#include +} namespace NES { -// Constructor with 4 parameters for temporal-static intersection -TemporalAIntersectsGeometryPhysicalFunction::TemporalAIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction staticGeometryFunction) - : isTemporal6Param(false) +TemporalAIntersectsGeometryPhysicalFunction::TemporalAIntersectsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) { parameterFunctions.reserve(4); - parameterFunctions.push_back(std::move(lon1Function)); - parameterFunctions.push_back(std::move(lat1Function)); - parameterFunctions.push_back(std::move(timestamp1Function)); - parameterFunctions.push_back(std::move(staticGeometryFunction)); -} - -// Constructor with 6 parameters for temporal-temporal intersection -TemporalAIntersectsGeometryPhysicalFunction::TemporalAIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction lon2Function, PhysicalFunction lat2Function, PhysicalFunction timestamp2Function) - : isTemporal6Param(true) -{ - parameterFunctions.reserve(6); - parameterFunctions.push_back(std::move(lon1Function)); - parameterFunctions.push_back(std::move(lat1Function)); - parameterFunctions.push_back(std::move(timestamp1Function)); - parameterFunctions.push_back(std::move(lon2Function)); - parameterFunctions.push_back(std::move(lat2Function)); - parameterFunctions.push_back(std::move(timestamp2Function)); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); } VarVal TemporalAIntersectsGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { - std::cout << "TemporalAIntersectsGeometryPhysicalFunction::execute called with " << parameterFunctions.size() << " arguments" << std::endl; - - // Execute all parameter functions to get their values std::vector parameterValues; parameterValues.reserve(parameterFunctions.size()); - for (const auto& paramFunc : parameterFunctions) { - parameterValues.push_back(paramFunc.execute(record, arena)); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); } - - if (isTemporal6Param) { - // 6-parameter case: temporal-temporal intersection - return executeTemporal6Param(parameterValues); - } else { - // 4-parameter case: temporal-static intersection - return executeTemporal4Param(parameterValues); - } -} -VarVal TemporalAIntersectsGeometryPhysicalFunction::executeTemporal6Param(const std::vector& params) const -{ - // Extract coordinate values: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - auto lon1 = params[0].cast>(); - auto lat1 = params[1].cast>(); - auto timestamp1 = params[2].cast>(); - auto lon2 = params[3].cast>(); - auto lat2 = params[4].cast>(); - auto timestamp2 = params[5].cast>(); - - std::cout << "6-param temporal-temporal aintersection with coordinate values" << std::endl; - - // Use nautilus::invoke to call external MEOS function with coordinate parameters - const auto result = nautilus::invoke( - +[](double lon1_val, double lat1_val, uint64_t ts1_val, double lon2_val, double lat2_val, uint64_t ts2_val) -> int { - try { - // Use the existing global MEOS initialization mechanism - MEOS::Meos::ensureMeosInitialized(); - auto inRange = [](double lo, double la){ return lo >= -180.0 && lo <= 180.0 && la >= -90.0 && la <= 90.0; }; - if (!inRange(lon1_val, lat1_val) || !inRange(lon2_val, lat2_val)) { - std::cout << "TemporalAIntersects: coordinates out of range" << std::endl; - return 0; - } - - // Convert UINT64 timestamps to MEOS timestamp strings - std::string timestamp1_str = MEOS::Meos::convertEpochToTimestamp(ts1_val); - std::string timestamp2_str = MEOS::Meos::convertEpochToTimestamp(ts2_val); - - // Build temporal geometry WKT strings from coordinates and timestamps - std::string left_geometry_wkt = fmt::format("SRID=4326;Point({} {})@{}", lon1_val, lat1_val, timestamp1_str); - std::string right_geometry_wkt = fmt::format("SRID=4326;Point({} {})@{}", lon2_val, lat2_val, timestamp2_str); - - std::cout << "Built temporal geometries:" << std::endl; - std::cout << "Left: " << left_geometry_wkt << std::endl; - std::cout << "Right: " << right_geometry_wkt << std::endl; - - // Both geometries are temporal points, use temporal-temporal aintersection - std::cout << "Using temporal-temporal aintersection (aintersects_tgeo_tgeo)" << std::endl; - MEOS::Meos::TemporalGeometry left_temporal(left_geometry_wkt); - if (!left_temporal.getGeometry()) { - std::cout << "TemporalAIntersects: left temporal geometry is null" << std::endl; - return 0; - } - MEOS::Meos::TemporalGeometry right_temporal(right_geometry_wkt); - if (!right_temporal.getGeometry()) { - std::cout << "TemporalAIntersects: right temporal geometry is null" << std::endl; - return 0; - } - int intersection_result = left_temporal.aintersects(right_temporal); - std::cout << "aintersects_tgeo_tgeo result: " << intersection_result << std::endl; - - return intersection_result; - } catch (const std::exception& e) { - std::cout << "MEOS exception in temporal geometry aintersection: " << e.what() << std::endl; - return -1; // Error case - } catch (...) { - std::cout << "Unknown error in temporal geometry aintersection" << std::endl; - return -1; // Error case - } - }, - lon1, lat1, timestamp1, lon2, lat2, timestamp2 - ); - - return VarVal(result); -} + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); -VarVal TemporalAIntersectsGeometryPhysicalFunction::executeTemporal4Param(const std::vector& params) const -{ - // Extract values: lon1, lat1, timestamp1, static_geometry_wkt - auto lon1 = params[0].cast>(); - auto lat1 = params[1].cast>(); - auto timestamp1 = params[2].cast>(); - auto static_geometry_varsized = params[3].cast(); - - std::cout << "4-param temporal-static aintersection with coordinate values" << std::endl; - - // Use nautilus::invoke to call external MEOS function with coordinate and geometry parameters const auto result = nautilus::invoke( - +[](double lon1_val, double lat1_val, uint64_t ts1_val, const char* static_geom_ptr, uint32_t static_geom_size) -> int { - try { - // Use the existing global MEOS initialization mechanism + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { MEOS::Meos::ensureMeosInitialized(); - if (!(lon1_val >= -180.0 && lon1_val <= 180.0 && lat1_val >= -90.0 && lat1_val <= 90.0)) { - std::cout << "TemporalAIntersects: coordinates out of range" << std::endl; + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { return 0; } - - // Convert UINT64 timestamp to MEOS timestamp string - std::string timestamp1_str = MEOS::Meos::convertEpochToTimestamp(ts1_val); - - // Build temporal geometry WKT string from coordinates and timestamp - std::string left_geometry_wkt = fmt::format("SRID=4326;Point({} {})@{}", lon1_val, lat1_val, timestamp1_str); - - // Extract static geometry WKT from VariableSizedData - std::string right_geometry_wkt(static_geom_ptr, static_geom_size); - - // Strip quotes if present (CSV parsing includes quotes in the string values) - while (!right_geometry_wkt.empty() && (right_geometry_wkt.front() == '\'' || right_geometry_wkt.front() == '"')) { - right_geometry_wkt = right_geometry_wkt.substr(1); - } - while (!right_geometry_wkt.empty() && (right_geometry_wkt.back() == '\'' || right_geometry_wkt.back() == '"')) { - right_geometry_wkt = right_geometry_wkt.substr(0, right_geometry_wkt.size() - 1); - } - - std::cout << "Built geometries:" << std::endl; - std::cout << "Left (temporal): " << left_geometry_wkt << std::endl; - std::cout << "Right (static): " << right_geometry_wkt << std::endl; - - // Validate input strings are not empty - if (left_geometry_wkt.empty() || right_geometry_wkt.empty()) { - std::cout << "Empty geometry WKT string(s)" << std::endl; - return -1; - } - - // Use temporal-static aintersection - std::cout << "Using temporal-static aintersection (aintersects_tgeo_geo)" << std::endl; - MEOS::Meos::TemporalGeometry left_temporal(left_geometry_wkt); - if (!left_temporal.getGeometry()) { - std::cout << "TemporalAIntersects: MEOS temporal geometry is null" << std::endl; - return 0; - } - MEOS::Meos::StaticGeometry right_static(right_geometry_wkt); - if (!right_static.getGeometry()) { - std::cout << "TemporalAIntersects: MEOS static geometry is null" << std::endl; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; - } - int intersection_result = left_temporal.aintersectsStatic(right_static); - std::cout << "aintersects_tgeo_geo result: " << intersection_result << std::endl; - - return intersection_result; - } catch (const std::exception& e) { - std::cout << "MEOS exception in temporal geometry aintersection: " << e.what() << std::endl; - return -1; // Error case - } catch (...) { - std::cout << "Unknown error in temporal geometry aintersection" << std::endl; - return -1; // Error case + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return aintersects_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; } }, - lon1, lat1, timestamp1, static_geometry_varsized.getContent(), static_geometry_varsized.getContentSize() - ); - + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + return VarVal(result); } -PhysicalFunctionRegistryReturnType -PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsGeometryPhysicalFunction(PhysicalFunctionRegistryArguments physicalFunctionRegistryArguments) +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) { - if (physicalFunctionRegistryArguments.childFunctions.size() == 4) { - return TemporalAIntersectsGeometryPhysicalFunction( - physicalFunctionRegistryArguments.childFunctions[0], - physicalFunctionRegistryArguments.childFunctions[1], - physicalFunctionRegistryArguments.childFunctions[2], - physicalFunctionRegistryArguments.childFunctions[3] - ); - } else if (physicalFunctionRegistryArguments.childFunctions.size() == 6) { - return TemporalAIntersectsGeometryPhysicalFunction( - physicalFunctionRegistryArguments.childFunctions[0], - physicalFunctionRegistryArguments.childFunctions[1], - physicalFunctionRegistryArguments.childFunctions[2], - physicalFunctionRegistryArguments.childFunctions[3], - physicalFunctionRegistryArguments.childFunctions[4], - physicalFunctionRegistryArguments.childFunctions[5] - ); - } else { - PRECONDITION(false, "TemporalAIntersectsGeometryPhysicalFunction requires 4 or 6 child functions, but got {}", physicalFunctionRegistryArguments.childFunctions.size()); - } + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalAIntersectsGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalAIntersectsGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } -} +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..50bf3c6301 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAIntersectsTCbufferCbufferPhysicalFunction::TemporalAIntersectsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalAIntersectsTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = aintersects_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalAIntersectsTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalAIntersectsTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..30b9298f61 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAIntersectsTCbufferPhysicalFunction::TemporalAIntersectsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAIntersectsTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = aintersects_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalAIntersectsTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalAIntersectsTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..3ca3c6478b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAIntersectsTCbufferTCbufferPhysicalFunction::TemporalAIntersectsTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAIntersectsTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = aintersects_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalAIntersectsTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalAIntersectsTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..7a958dccf9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAIntersectsTGeometryPhysicalFunction::TemporalAIntersectsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAIntersectsTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return aintersects_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalAIntersectsTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalAIntersectsTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..a50638053f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAIntersectsTNpointGeometryPhysicalFunction::TemporalAIntersectsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAIntersectsTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = aintersects_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalAIntersectsTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalAIntersectsTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..daa80b7093 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAIntersectsTNpointTNpointPhysicalFunction::TemporalAIntersectsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAIntersectsTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = aintersects_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalAIntersectsTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalAIntersectsTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..98370112a6 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAIntersectsTPoseGeometryPhysicalFunction::TemporalAIntersectsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAIntersectsTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = aintersects_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalAIntersectsTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalAIntersectsTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..f583c92e19 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAIntersectsTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalAIntersectsTPoseTPosePhysicalFunction::TemporalAIntersectsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalAIntersectsTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = aintersects_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAIntersectsTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalAIntersectsTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalAIntersectsTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..5f52041227 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalATouchesGeometryPhysicalFunction::TemporalATouchesGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalATouchesGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return atouches_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalATouchesGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalATouchesGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..1f6551a042 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalATouchesTCbufferCbufferPhysicalFunction::TemporalATouchesTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalATouchesTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = atouches_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalATouchesTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalATouchesTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..8fea0f9319 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalATouchesTCbufferPhysicalFunction::TemporalATouchesTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalATouchesTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = atouches_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalATouchesTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalATouchesTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..db67648002 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalATouchesTCbufferTCbufferPhysicalFunction::TemporalATouchesTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalATouchesTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = atouches_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalATouchesTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalATouchesTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..5befc70bec --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalATouchesTGeometryPhysicalFunction::TemporalATouchesTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalATouchesTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return atouches_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalATouchesTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalATouchesTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..83b47a5f65 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalATouchesTNpointGeometryPhysicalFunction::TemporalATouchesTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalATouchesTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = atouches_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalATouchesTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalATouchesTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..9efb004284 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalATouchesTNpointTNpointPhysicalFunction::TemporalATouchesTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalATouchesTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = atouches_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalATouchesTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalATouchesTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..b8b52bd58d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalATouchesTPoseGeometryPhysicalFunction::TemporalATouchesTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalATouchesTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = atouches_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalATouchesTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalATouchesTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..65767e2a08 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalATouchesTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalATouchesTPoseTPosePhysicalFunction::TemporalATouchesTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalATouchesTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = atouches_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalATouchesTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalATouchesTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalATouchesTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAtGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAtGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..ab946b1f10 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalAtGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalAtGeometryPhysicalFunction::TemporalAtGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalAtGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS restriction call — returns Temporal* (non-null if the + // input survived the restriction, null if clipped/empty). + // For per-event single-instant inputs this collapses to a + // filter predicate: 1 if the point survives, 0 if clipped. + Temporal* clipped = tgeo_at_geom(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + if (clipped == nullptr) return 0; + free(clipped); + return 1; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAtGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalAtGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalAtGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalAtStBoxPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalAtStBoxPhysicalFunction.cpp index 2eb3132cd0..0a5b860107 100644 --- a/nes-physical-operators/src/Functions/Meos/TemporalAtStBoxPhysicalFunction.cpp +++ b/nes-physical-operators/src/Functions/Meos/TemporalAtStBoxPhysicalFunction.cpp @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include #include @@ -10,40 +24,27 @@ #include #include #include -#include -#include #include #include #include +extern "C" { +#include +#include +} + namespace NES { TemporalAtStBoxPhysicalFunction::TemporalAtStBoxPhysicalFunction(PhysicalFunction lonFunction, - PhysicalFunction latFunction, - PhysicalFunction timestampFunction, - PhysicalFunction stboxFunction) - : hasBorderParam(false) + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) { parameterFunctions.reserve(4); parameterFunctions.push_back(std::move(lonFunction)); parameterFunctions.push_back(std::move(latFunction)); parameterFunctions.push_back(std::move(timestampFunction)); - parameterFunctions.push_back(std::move(stboxFunction)); -} - -TemporalAtStBoxPhysicalFunction::TemporalAtStBoxPhysicalFunction(PhysicalFunction lonFunction, - PhysicalFunction latFunction, - PhysicalFunction timestampFunction, - PhysicalFunction stboxFunction, - PhysicalFunction borderInclusiveFunction) - : hasBorderParam(true) -{ - parameterFunctions.reserve(5); - parameterFunctions.push_back(std::move(lonFunction)); - parameterFunctions.push_back(std::move(latFunction)); - parameterFunctions.push_back(std::move(timestampFunction)); - parameterFunctions.push_back(std::move(stboxFunction)); - parameterFunctions.push_back(std::move(borderInclusiveFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); } VarVal TemporalAtStBoxPhysicalFunction::execute(const Record& record, ArenaRef& arena) const @@ -55,74 +56,69 @@ VarVal TemporalAtStBoxPhysicalFunction::execute(const Record& record, ArenaRef& parameterValues.emplace_back(function.execute(record, arena)); } - auto lon = parameterValues[0].cast>(); - auto lat = parameterValues[1].cast>(); + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); auto timestamp = parameterValues[2].cast>(); - auto stboxLiteral = parameterValues[3].cast(); - - nautilus::val borderVal = nautilus::val(true); - if (hasBorderParam && parameterValues.size() >= 5) - { - borderVal = parameterValues[4].cast>(); - } + auto geometry = parameterValues[3].cast(); const auto result = nautilus::invoke( +[](double lonValue, double latValue, uint64_t timestampValue, - const char* stboxPtr, - uint32_t stboxSize, - bool borderInclusiveFlag) -> int { + const char* geometryPtr, + uint32_t geometrySize) -> int { try { MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); - std::string stboxWkt(stboxPtr, stboxSize); - while (!stboxWkt.empty() && (stboxWkt.front()=='\'' || stboxWkt.front()=='"')) stboxWkt.erase(stboxWkt.begin()); - while (!stboxWkt.empty() && (stboxWkt.back()=='\'' || stboxWkt.back()=='"')) stboxWkt.pop_back(); - if (temporalGeometryWkt.empty() || stboxWkt.empty()) return 0; + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); if (!temporalGeometry.getGeometry()) return 0; - MEOS::Meos::SpatioTemporalBox stbox(stboxWkt); - if (!stbox.getBox()) return 0; - MEOS::Meos::TemporalHolder clipped(MEOS::Meos::safe_tgeo_at_stbox(temporalGeometry.getGeometry(), stbox.getBox(), borderInclusiveFlag)); - return clipped.get() != nullptr ? 1 : 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS restriction call — returns Temporal* (non-null if the + // input survived the restriction, null if clipped/empty). + // For per-event single-instant inputs this collapses to a + // filter predicate: 1 if the point survives, 0 if clipped. + Temporal* clipped = tgeo_at_stbox(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + if (clipped == nullptr) return 0; + free(clipped); + return 1; + } + catch (const std::exception&) + { + return 0; } - catch (...) { return -1; } }, - lon, - lat, - timestamp, - stboxLiteral.getContent(), - stboxLiteral.getContentSize(), - borderVal); + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); return VarVal(result); } -PhysicalFunctionRegistryReturnType -PhysicalFunctionGeneratedRegistrar::RegisterTemporalAtStBoxPhysicalFunction(PhysicalFunctionRegistryArguments arguments) +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalAtStBoxPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) { - if (arguments.childFunctions.size() == 4) - { - return TemporalAtStBoxPhysicalFunction(arguments.childFunctions[0], - arguments.childFunctions[1], - arguments.childFunctions[2], - arguments.childFunctions[3]); - } - if (arguments.childFunctions.size() == 5) - { - return TemporalAtStBoxPhysicalFunction(arguments.childFunctions[0], - arguments.childFunctions[1], - arguments.childFunctions[2], - arguments.childFunctions[3], - arguments.childFunctions[4]); - } - PRECONDITION(false, - "TemporalAtStBoxPhysicalFunction requires 4 or 5 child functions, but got {}", + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalAtStBoxPhysicalFunction requires 4 children but got {}", arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalAtStBoxPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } } // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalCmpPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalCmpPhysicalFunction.cpp new file mode 100644 index 0000000000..7367f4f9e8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalCmpPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalCmpPhysicalFunction::TemporalCmpPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalCmpPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_cmp(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalCmpPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalCmpPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalCmpPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.cpp new file mode 100644 index 0000000000..dd90cc00ba --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalDyntimewarpDistancePhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalDyntimewarpDistancePhysicalFunction::TemporalDyntimewarpDistancePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalDyntimewarpDistancePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_dyntimewarp_distance(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalDyntimewarpDistancePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalDyntimewarpDistancePhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalDyntimewarpDistancePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.cpp index 47e45a85ef..f8b1b97073 100644 --- a/nes-physical-operators/src/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.cpp +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsGeometryPhysicalFunction.cpp @@ -1,251 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include -#include + +#include #include -#include -#include #include +#include #include -#include +#include #include -#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} namespace NES { -/* ─────────── constructors ─────────── */ - -TemporalEContainsGeometryPhysicalFunction:: -TemporalEContainsGeometryPhysicalFunction(PhysicalFunction param1, - PhysicalFunction param2, - PhysicalFunction param3, - PhysicalFunction param4) - : paramFns{std::move(param1),std::move(param2),std::move(param3),std::move(param4)} { -} - -TemporalEContainsGeometryPhysicalFunction:: -TemporalEContainsGeometryPhysicalFunction(PhysicalFunction lon1, - PhysicalFunction lat1, - PhysicalFunction ts1, - PhysicalFunction lon2, - PhysicalFunction lat2, - PhysicalFunction ts2) - : paramFns{std::move(lon1),std::move(lat1),std::move(ts1), - std::move(lon2),std::move(lat2),std::move(ts2)} { +TemporalEContainsGeometryPhysicalFunction::TemporalEContainsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); } -/* ─────────── dispatch ─────────── */ - -VarVal TemporalEContainsGeometryPhysicalFunction::execute(const Record& rec, - ArenaRef& arena) const { - std::cout << "TemporalEContainsGeometryPhysicalFunction::execute called with " << paramFns.size() << " arguments" << std::endl; - std::vector vals; vals.reserve(paramFns.size()); - for(auto& f:paramFns){ - vals.push_back(f.execute(rec, arena)); - } - - // For 4-parameter case, determine mode based on first parameter type at compile-time - if (paramFns.size() == 4) { - // Use customVisit to determine type at compile-time and dispatch accordingly - return vals[0].customVisit([this, &vals](const auto& val) -> VarVal { - using T = std::decay_t; - if constexpr (std::is_same_v) { - return execStaticTemporal(vals); // static, lon, lat, ts - } else { - return execTemporalStatic(vals); // lon, lat, ts, static - } - }); +VarVal TemporalEContainsGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); } - - // 6-parameter case is always temporal-temporal - return execTemporalTemporal(vals); -} - -/* ─────────── helpers ─────────── */ -VarVal -TemporalEContainsGeometryPhysicalFunction::execTemporalTemporal(const std::vector& p) const { - auto lon1 = p[0].cast>(); - auto lat1 = p[1].cast>(); - auto ts1 = p[2].cast>(); - auto lon2 = p[3].cast>(); - auto lat2 = p[4].cast>(); - auto ts2 = p[5].cast>(); - - std::cout << "6-param temporal-temporal contains function with coordinate values" << std::endl; - - - const auto res = nautilus::invoke( - +[](double lo1,double la1,uint64_t t1, double lo2, double la2, uint64_t t2) -> int { - try { + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { MEOS::Meos::ensureMeosInitialized(); - auto inRange = [](double lo, double la){ return lo >= -180.0 && lo <= 180.0 && la >= -90.0 && la <= 90.0; }; - if (!inRange(lo1, la1) || !inRange(lo2, la2)) { - std::cout << "TemporalEContains: coordinates out of range" << std::endl; + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { return 0; } - auto tsToStr = MEOS::Meos::convertEpochToTimestamp; - std::string left = fmt::format("SRID=4326;Point({} {})@{}", lo1, la1, tsToStr(t1)); - std::string right = fmt::format("SRID=4326;Point({} {})@{}", lo2, la2, tsToStr(t2)); - MEOS::Meos::TemporalGeometry l(left), r(right); - return l.contains(r); - } catch (const std::exception& e) { - std::cout << "MEOS exception in temporal geometry contains: " << e.what() << std::endl; - return -1; // Error case - } catch (...) { - std::cout << "Unknown error in temporal geometry contains" << std::endl; - return -1; // Error case - } - }, lon1,lat1,ts1,lon2,lat2,ts2 - ); - return VarVal(res); -} - -VarVal -TemporalEContainsGeometryPhysicalFunction::execTemporalStatic(const std::vector& p) const -{ - auto lon = p[0].cast>(); - auto lat = p[1].cast>(); - auto ts = p[2].cast>(); - auto stat = p[3].cast(); - std::cout << "4-param temporal-static contains function with coordinate values" << std::endl; + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); - const auto res = nautilus::invoke( - +[](double lo,double la,uint64_t t, const char* g, uint32_t sz) -> int { - try { - MEOS::Meos::ensureMeosInitialized(); - if (!(lo >= -180.0 && lo <= 180.0 && la >= -90.0 && la <= 90.0)) { - std::cout << "TemporalEContains: coordinates out of range" << std::endl; + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; - } - std::string tsStr = MEOS::Meos::convertEpochToTimestamp(t); - std::string left = fmt::format("SRID=4326;Point({} {})@{}", lo, la, tsStr); - std::string right(g, sz); - while (!right.empty() && (right.front() == '\'' || right.front() == '"')) { - right = right.substr(1); - } - while (!right.empty() && (right.back() == '\'' || right.back() == '"')) { - right = right.substr(0, right.size() - 1); - } - std::cout << "Built geometries:" << std::endl; - std::cout << "Left (temporal): " << left << std::endl; - std::cout << "Right (static): " << right << std::endl; - - // Validate input strings are not empty - if (left.empty() || right.empty()) { - std::cout << "Empty geometry WKT string(s)" << std::endl; - return -1; - } - std::cout << "Using temporal-static contains function (econtains_tgeo_geo)" << std::endl; - MEOS::Meos::TemporalGeometry l(left); - if (!l.getGeometry()) { - std::cout << "TemporalEContains: MEOS temporal geometry is null" << std::endl; - return 0; - } - MEOS::Meos::StaticGeometry r(right); - if (!r.getGeometry()) { - std::cout << "TemporalEContains: MEOS static geometry is null" << std::endl; - return 0; - } - int contains_result = l.containsStatic(r); - std::cout << "econtains_tgeo_geo result: " << contains_result << std::endl; - return contains_result; - } catch (const std::exception& e) { - std::cout << "MEOS exception in temporal geometry contains: " << e.what() << std::endl; - return -1; // Error case - } catch (...) { - std::cout << "Unknown error in temporal geometry contains" << std::endl; - return -1; // Error case + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return econtains_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); } - }, lon,lat,ts, stat.getContent(), stat.getContentSize()); - - return VarVal(res); -} - -VarVal -TemporalEContainsGeometryPhysicalFunction::execStaticTemporal(const std::vector& p) const -{ - auto stat = p[0].cast(); - auto lon = p[1].cast>(); - auto lat = p[2].cast>(); - auto ts = p[3].cast>(); - std::cout << "4-param static-temporal contains function with coordinate values" << std::endl; - - - const auto res = nautilus::invoke( - +[](const char* g,uint32_t sz, double lo,double la,uint64_t t) -> int { - try { - MEOS::Meos::ensureMeosInitialized(); - if (!(lo >= -180.0 && lo <= 180.0 && la >= -90.0 && la <= 90.0)) { - std::cout << "TemporalEContains: coordinates out of range" << std::endl; - return 0; - } - std::string tsStr = MEOS::Meos::convertEpochToTimestamp(t); - std::string right = fmt::format("SRID=4326;Point({} {})@{}", lo, la, tsStr); - std::string left(g, sz); - while (!left.empty() && (left.front() == '\'' || left.front() == '"')) { - left = left.substr(1); - } - while (!left.empty() && (left.back() == '\'' || left.back() == '"')) { - left = left.substr(0, left.size() - 1); - } - std::cout << "Built geometries:" << std::endl; - std::cout << "Left (static): " << left << std::endl; - std::cout << "Right (temporal): " << right << std::endl; - - // Validate input strings are not empty - if (left.empty() || right.empty()) { - std::cout << "Empty geometry WKT string(s)" << std::endl; - return -1; - } - std::cout << "Using static-temporal contains function (econtains_geo_tgeo)" << std::endl; - - MEOS::Meos::StaticGeometry l(left); - if (!l.getGeometry()) { - std::cout << "TemporalEContains: MEOS static geometry is null" << std::endl; - return 0; - } - MEOS::Meos::TemporalGeometry r(right); - if (!r.getGeometry()) { - std::cout << "TemporalEContains: MEOS temporal geometry is null" << std::endl; - return 0; - } - int contains_result = l.containsTemporal(r); - std::cout << "econtains_geo_tgeo result: " << contains_result << std::endl; - return contains_result; - } catch (const std::exception& e) { - std::cout << "MEOS exception in temporal geometry contains: " << e.what() << std::endl; - return -1; // Error case - } catch (...) { - std::cout << "Unknown error in temporal geometry contains" << std::endl; - return -1; // Error case + catch (const std::exception&) + { + return 0; } - }, stat.getContent(), stat.getContentSize(), lon,lat,ts); + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); - return VarVal(res); + return VarVal(result); } -/* ─────────── registry ─────────── */ - -PhysicalFunctionRegistryReturnType -PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsGeometryPhysicalFunction( - PhysicalFunctionRegistryArguments physicalFunctionRegistryArguments){ - if (physicalFunctionRegistryArguments.childFunctions.size() == 6) { - return TemporalEContainsGeometryPhysicalFunction( - physicalFunctionRegistryArguments.childFunctions[0], - physicalFunctionRegistryArguments.childFunctions[1], - physicalFunctionRegistryArguments.childFunctions[2], - physicalFunctionRegistryArguments.childFunctions[3], - physicalFunctionRegistryArguments.childFunctions[4], - physicalFunctionRegistryArguments.childFunctions[5] - ); - } - PRECONDITION(physicalFunctionRegistryArguments.childFunctions.size()==4, - "TemporalEContainsGeometry expects 4 or 6 child functions, got {}", physicalFunctionRegistryArguments.childFunctions.size()); - - return TemporalEContainsGeometryPhysicalFunction(physicalFunctionRegistryArguments.childFunctions[0],physicalFunctionRegistryArguments.childFunctions[1], - physicalFunctionRegistryArguments.childFunctions[2],physicalFunctionRegistryArguments.childFunctions[3]); +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalEContainsGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalEContainsGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } } // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..31d0c598db --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEContainsTCbufferCbufferPhysicalFunction::TemporalEContainsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalEContainsTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = econtains_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEContainsTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEContainsTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..59f23fcf45 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEContainsTCbufferPhysicalFunction::TemporalEContainsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEContainsTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = econtains_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEContainsTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEContainsTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..05b5b13dd4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEContainsTGeometryPhysicalFunction::TemporalEContainsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEContainsTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return econtains_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEContainsTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEContainsTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..e895fbcd94 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEContainsTNpointGeometryPhysicalFunction::TemporalEContainsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEContainsTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = econtains_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalEContainsTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalEContainsTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..b435a68713 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEContainsTNpointTNpointPhysicalFunction::TemporalEContainsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEContainsTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = econtains_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEContainsTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEContainsTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..3ac62f1c41 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEContainsTPoseGeometryPhysicalFunction::TemporalEContainsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEContainsTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = econtains_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEContainsTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEContainsTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..aea0df7fc9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEContainsTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEContainsTPoseTPosePhysicalFunction::TemporalEContainsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEContainsTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = econtains_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEContainsTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalEContainsTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalEContainsTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..58cd90da42 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalECoversGeometryPhysicalFunction::TemporalECoversGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalECoversGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return ecovers_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalECoversGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalECoversGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..48cd6e62d7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalECoversTCbufferCbufferPhysicalFunction::TemporalECoversTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalECoversTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = ecovers_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalECoversTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalECoversTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..8bcadf9d84 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalECoversTCbufferPhysicalFunction::TemporalECoversTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalECoversTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = ecovers_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalECoversTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalECoversTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..31e2d7115a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalECoversTCbufferTCbufferPhysicalFunction::TemporalECoversTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalECoversTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = ecovers_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalECoversTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalECoversTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..e3f779641c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalECoversTGeometryPhysicalFunction::TemporalECoversTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalECoversTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return ecovers_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalECoversTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalECoversTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..b5ea18d1a0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalECoversTNpointGeometryPhysicalFunction::TemporalECoversTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalECoversTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = ecovers_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalECoversTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalECoversTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..000b4cd7b5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalECoversTNpointTNpointPhysicalFunction::TemporalECoversTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalECoversTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = ecovers_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalECoversTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalECoversTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..6cf9f98956 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalECoversTPoseGeometryPhysicalFunction::TemporalECoversTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalECoversTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = ecovers_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalECoversTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalECoversTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..57e165f1e4 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalECoversTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalECoversTPoseTPosePhysicalFunction::TemporalECoversTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalECoversTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = ecovers_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalECoversTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalECoversTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalECoversTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.cpp index 6bbdeba1c6..f1506abd88 100644 --- a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.cpp +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinGeometryPhysicalFunction.cpp @@ -1,3 +1,17 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include #include @@ -10,25 +24,29 @@ #include #include #include -#include #include #include #include +extern "C" { +#include +#include +} + namespace NES { TemporalEDWithinGeometryPhysicalFunction::TemporalEDWithinGeometryPhysicalFunction(PhysicalFunction lonFunction, - PhysicalFunction latFunction, - PhysicalFunction timestampFunction, - PhysicalFunction geometryFunction, - PhysicalFunction distanceFunction) + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) { parameterFunctions.reserve(5); parameterFunctions.push_back(std::move(lonFunction)); parameterFunctions.push_back(std::move(latFunction)); parameterFunctions.push_back(std::move(timestampFunction)); parameterFunctions.push_back(std::move(geometryFunction)); - parameterFunctions.push_back(std::move(distanceFunction)); + parameterFunctions.push_back(std::move(distFunction)); } VarVal TemporalEDWithinGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const @@ -40,11 +58,11 @@ VarVal TemporalEDWithinGeometryPhysicalFunction::execute(const Record& record, A parameterValues.emplace_back(function.execute(record, arena)); } - auto lon = parameterValues[0].cast>(); - auto lat = parameterValues[1].cast>(); + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); auto timestamp = parameterValues[2].cast>(); - auto geometry = parameterValues[3].cast(); - auto distance = parameterValues[4].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); const auto result = nautilus::invoke( +[](double lonValue, @@ -52,14 +70,11 @@ VarVal TemporalEDWithinGeometryPhysicalFunction::execute(const Record& record, A uint64_t timestampValue, const char* geometryPtr, uint32_t geometrySize, - double distanceValue) -> int { + double distValue) -> int { try { MEOS::Meos::ensureMeosInitialized(); - if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { - std::cout << "TemporalEDWithin: coordinates out of range" << std::endl; - return 0; - } + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); @@ -70,36 +85,41 @@ VarVal TemporalEDWithinGeometryPhysicalFunction::execute(const Record& record, A while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) staticGeometryWkt.pop_back(); - if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) - return 0; + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); if (!temporalGeometry.getGeometry()) return 0; MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); if (!staticGeometry.getGeometry()) return 0; - return MEOS::Meos::safe_edwithin_tgeo_geo(static_cast(temporalGeometry.getGeometry()), - static_cast(staticGeometry.getGeometry()), - distanceValue); + // MEOS *_tgeo_geo with trailing distance arg + // — int fn(const Temporal*, const GSERIALIZED*, double). + return edwithin_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; } - catch (...) { return -1; } }, - lon, lat, timestamp, geometry.getContent(), geometry.getContentSize(), distance); + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize(), dist); return VarVal(result); } -PhysicalFunctionRegistryReturnType -PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinGeometryPhysicalFunction(PhysicalFunctionRegistryArguments arguments) +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) { PRECONDITION(arguments.childFunctions.size() == 5, - "TemporalEDWithinGeometryPhysicalFunction requires 5 child functions, but got {}", + "TemporalEDWithinGeometryPhysicalFunction requires 5 children but got {}", arguments.childFunctions.size()); - return TemporalEDWithinGeometryPhysicalFunction(arguments.childFunctions[0], - arguments.childFunctions[1], - arguments.childFunctions[2], - arguments.childFunctions[3], - arguments.childFunctions[4]); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEDWithinGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); } } // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..3db02415b8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDWithinTCbufferCbufferPhysicalFunction::TemporalEDWithinTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* cbufLitPtr, uint32_t cbufLitSize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = edwithin_tcbuffer_cbuffer(tcbuffer, cb, distValue); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEDWithinTCbufferCbufferPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEDWithinTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..8477de56e0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferGeometryPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDWithinTCbufferGeometryPhysicalFunction::TemporalEDWithinTCbufferGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTCbufferGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonValue, double latValue, double radiusValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = edwithin_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry(), distValue); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTCbufferGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEDWithinTCbufferGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEDWithinTCbufferGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..2733cef0ff --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,132 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDWithinTCbufferTCbufferPhysicalFunction::TemporalEDWithinTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = edwithin_tcbuffer_tcbuffer(tA, tB, distValue); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "TemporalEDWithinTCbufferTCbufferPhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return TemporalEDWithinTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..7dbe6d5745 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDWithinTGeometryPhysicalFunction::TemporalEDWithinTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo with trailing distance arg + // — int fn(const Temporal*, const Temporal*, double). + return edwithin_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry(), + distValue); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "TemporalEDWithinTGeometryPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return TemporalEDWithinTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..e90a95349b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDWithinTNpointGeometryPhysicalFunction::TemporalEDWithinTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + auto dist = parameterValues[4].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = edwithin_tgeo_geo(tgeo, staticGeometry.getGeometry(), distValue); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEDWithinTNpointGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEDWithinTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..724348f800 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,131 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDWithinTNpointTNpointPhysicalFunction::TemporalEDWithinTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(7); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + auto dist = parameterValues[6].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = edwithin_tgeo_tgeo(tgeoA, tgeoB, distValue); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 7, + "TemporalEDWithinTNpointTNpointPhysicalFunction requires 7 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + return TemporalEDWithinTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..b2fb976ef9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,128 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDWithinTPoseGeometryPhysicalFunction::TemporalEDWithinTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + auto dist = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize, double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = edwithin_tgeo_geo(tgeo, staticGeometry.getGeometry(), distValue); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize(), dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEDWithinTPoseGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEDWithinTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..36f2ef4921 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDWithinTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,141 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDWithinTPoseTPosePhysicalFunction::TemporalEDWithinTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction, + PhysicalFunction distFunction) +{ + parameterFunctions.reserve(9); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); + parameterFunctions.push_back(std::move(distFunction)); +} + +VarVal TemporalEDWithinTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + auto dist = parameterValues[8].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue, + double distValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = edwithin_tgeo_tgeo(tgeoA, tgeoB, distValue); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB, dist); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDWithinTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 9, + "TemporalEDWithinTPoseTPosePhysicalFunction requires 9 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + auto arg8 = std::move(arguments.childFunctions[8]); + return TemporalEDWithinTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..495dc71785 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDisjointGeometryPhysicalFunction::TemporalEDisjointGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEDisjointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return edisjoint_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalEDisjointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalEDisjointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..700fe2b7e9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDisjointTCbufferCbufferPhysicalFunction::TemporalEDisjointTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalEDisjointTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = edisjoint_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEDisjointTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEDisjointTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..1fee5ab0bf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDisjointTCbufferPhysicalFunction::TemporalEDisjointTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEDisjointTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = edisjoint_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEDisjointTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEDisjointTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..1ca54a8fc9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEDisjointTGeometryPhysicalFunction::TemporalEDisjointTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEDisjointTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return edisjoint_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEDisjointTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEDisjointTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..46f7468653 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDisjointTNpointGeometryPhysicalFunction::TemporalEDisjointTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEDisjointTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = edisjoint_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalEDisjointTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalEDisjointTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..382139b115 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDisjointTNpointTNpointPhysicalFunction::TemporalEDisjointTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEDisjointTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = edisjoint_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEDisjointTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEDisjointTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..ecc47f1b43 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDisjointTPoseGeometryPhysicalFunction::TemporalEDisjointTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEDisjointTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = edisjoint_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEDisjointTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEDisjointTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..b80c5ba86b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEDisjointTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEDisjointTPoseTPosePhysicalFunction::TemporalEDisjointTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEDisjointTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = edisjoint_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEDisjointTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalEDisjointTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalEDisjointTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..847b2cf06a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEIntersectsGeometryPhysicalFunction::TemporalEIntersectsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEIntersectsGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return eintersects_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalEIntersectsGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalEIntersectsGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..5de1cafc04 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEIntersectsTCbufferCbufferPhysicalFunction::TemporalEIntersectsTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalEIntersectsTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = eintersects_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEIntersectsTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEIntersectsTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..e35995fa24 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEIntersectsTCbufferPhysicalFunction::TemporalEIntersectsTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEIntersectsTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = eintersects_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEIntersectsTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEIntersectsTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..2edfa8b7e8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEIntersectsTCbufferTCbufferPhysicalFunction::TemporalEIntersectsTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEIntersectsTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = eintersects_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalEIntersectsTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalEIntersectsTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..2654e596fd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEIntersectsTGeometryPhysicalFunction::TemporalEIntersectsTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEIntersectsTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return eintersects_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEIntersectsTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEIntersectsTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..f725c4834c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEIntersectsTNpointGeometryPhysicalFunction::TemporalEIntersectsTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEIntersectsTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = eintersects_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalEIntersectsTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalEIntersectsTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..e958e3f6dd --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEIntersectsTNpointTNpointPhysicalFunction::TemporalEIntersectsTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEIntersectsTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = eintersects_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEIntersectsTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEIntersectsTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..02a357ae40 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEIntersectsTPoseGeometryPhysicalFunction::TemporalEIntersectsTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalEIntersectsTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = eintersects_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalEIntersectsTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalEIntersectsTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..a0ae84b98f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEIntersectsTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalEIntersectsTPoseTPosePhysicalFunction::TemporalEIntersectsTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEIntersectsTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = eintersects_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEIntersectsTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalEIntersectsTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalEIntersectsTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..b66b50a0d0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalETouchesGeometryPhysicalFunction::TemporalETouchesGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalETouchesGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { + return 0; + } + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) + return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return etouches_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalETouchesGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalETouchesGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..59b0e43d60 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalETouchesTCbufferCbufferPhysicalFunction::TemporalETouchesTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalETouchesTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + int r = etouches_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalETouchesTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalETouchesTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..ae6e9b6a87 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalETouchesTCbufferPhysicalFunction::TemporalETouchesTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalETouchesTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + int r = etouches_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalETouchesTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalETouchesTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..28ab4beb81 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalETouchesTCbufferTCbufferPhysicalFunction::TemporalETouchesTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalETouchesTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + int r = etouches_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalETouchesTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalETouchesTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..092df2a3cf --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalETouchesTGeometryPhysicalFunction::TemporalETouchesTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalETouchesTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return etouches_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalETouchesTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalETouchesTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..1d5cac5d68 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalETouchesTNpointGeometryPhysicalFunction::TemporalETouchesTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalETouchesTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + int r = etouches_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalETouchesTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalETouchesTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..7c6c5ceb1f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalETouchesTNpointTNpointPhysicalFunction::TemporalETouchesTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalETouchesTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + int r = etouches_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalETouchesTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalETouchesTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..762fb564bb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalETouchesTPoseGeometryPhysicalFunction::TemporalETouchesTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalETouchesTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + int r = etouches_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalETouchesTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalETouchesTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..b3de0feea9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalETouchesTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalETouchesTPoseTPosePhysicalFunction::TemporalETouchesTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalETouchesTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + int r = etouches_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalETouchesTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalETouchesTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalETouchesTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalEqPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalEqPhysicalFunction.cpp new file mode 100644 index 0000000000..534a632e94 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalEqPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalEqPhysicalFunction::TemporalEqPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalEqPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_eq(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalEqPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalEqPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalEqPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalFrechetDistancePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalFrechetDistancePhysicalFunction.cpp new file mode 100644 index 0000000000..66eab726e5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalFrechetDistancePhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalFrechetDistancePhysicalFunction::TemporalFrechetDistancePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalFrechetDistancePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_frechet_distance(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalFrechetDistancePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalFrechetDistancePhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalFrechetDistancePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalGePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalGePhysicalFunction.cpp new file mode 100644 index 0000000000..3d5d94d89d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalGePhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalGePhysicalFunction::TemporalGePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalGePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_ge(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalGePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalGePhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalGePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalGtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalGtPhysicalFunction.cpp new file mode 100644 index 0000000000..c45d39e504 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalGtPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalGtPhysicalFunction::TemporalGtPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalGtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_gt(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalGtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalGtPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalGtPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.cpp new file mode 100644 index 0000000000..6b128a6a6f --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalHausdorffDistancePhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalHausdorffDistancePhysicalFunction::TemporalHausdorffDistancePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalHausdorffDistancePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_hausdorff_distance(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalHausdorffDistancePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalHausdorffDistancePhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalHausdorffDistancePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.cpp index cf05e1744f..ba10f57d7d 100644 --- a/nes-physical-operators/src/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.cpp +++ b/nes-physical-operators/src/Functions/Meos/TemporalIntersectsGeometryPhysicalFunction.cpp @@ -1,198 +1,124 @@ -#include -#include -#include -#include +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + #include + #include +#include #include #include #include +#include #include #include -#include -#include #include -#include -#include #include +#include +#include +#include + +extern "C" { +#include +#include +} namespace NES { -// Constructor with 4 parameters for temporal-static intersection -TemporalIntersectsGeometryPhysicalFunction::TemporalIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction staticGeometryFunction) - : isTemporal6Param(false) +TemporalIntersectsGeometryPhysicalFunction::TemporalIntersectsGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) { parameterFunctions.reserve(4); - parameterFunctions.push_back(std::move(lon1Function)); - parameterFunctions.push_back(std::move(lat1Function)); - parameterFunctions.push_back(std::move(timestamp1Function)); - parameterFunctions.push_back(std::move(staticGeometryFunction)); -} - -// Constructor with 6 parameters for temporal-temporal intersection -TemporalIntersectsGeometryPhysicalFunction::TemporalIntersectsGeometryPhysicalFunction(PhysicalFunction lon1Function, PhysicalFunction lat1Function, PhysicalFunction timestamp1Function, PhysicalFunction lon2Function, PhysicalFunction lat2Function, PhysicalFunction timestamp2Function) - : isTemporal6Param(true) -{ - parameterFunctions.reserve(6); - parameterFunctions.push_back(std::move(lon1Function)); - parameterFunctions.push_back(std::move(lat1Function)); - parameterFunctions.push_back(std::move(timestamp1Function)); - parameterFunctions.push_back(std::move(lon2Function)); - parameterFunctions.push_back(std::move(lat2Function)); - parameterFunctions.push_back(std::move(timestamp2Function)); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); } VarVal TemporalIntersectsGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const { - std::cout << "TemporalIntersectsGeometryPhysicalFunction::execute called with " << parameterFunctions.size() << " arguments" << std::endl; - - // Execute all parameter functions to get their values std::vector parameterValues; parameterValues.reserve(parameterFunctions.size()); - for (const auto& paramFunc : parameterFunctions) { - parameterValues.push_back(paramFunc.execute(record, arena)); - } - - if (isTemporal6Param) { - // 6-parameter case: temporal-temporal intersection - return executeTemporal6Param(parameterValues); - } else { - // 4-parameter case: temporal-static intersection - return executeTemporal4Param(parameterValues); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); } -} -VarVal TemporalIntersectsGeometryPhysicalFunction::executeTemporal6Param(const std::vector& params) const -{ - // Extract coordinate values: lon1, lat1, timestamp1, lon2, lat2, timestamp2 - auto lon1 = params[0].cast>(); - auto lat1 = params[1].cast>(); - auto timestamp1 = params[2].cast>(); - auto lon2 = params[3].cast>(); - auto lat2 = params[4].cast>(); - auto timestamp2 = params[5].cast>(); - - std::cout << "6-param temporal-temporal intersection with coordinate values" << std::endl; - - // Use nautilus::invoke to call external MEOS function with coordinate parameters + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + const auto result = nautilus::invoke( - +[](double lon1_val, double lat1_val, uint64_t ts1_val, double lon2_val, double lat2_val, uint64_t ts2_val) -> int { - try { - // Use the existing global MEOS initialization mechanism + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { MEOS::Meos::ensureMeosInitialized(); - // Basic lon/lat sanity check to prevent bogus inputs - auto inRange = [](double lo, double la){ return lo >= -180.0 && lo <= 180.0 && la >= -90.0 && la <= 90.0; }; - if (!inRange(lon1_val, lat1_val) || !inRange(lon2_val, lat2_val)) { - std::cout << "TemporalIntersects: coordinates out of range" << std::endl; - return 0; - } - - // Convert timestamps in seconds/ms/us/ns to MEOS timestamp strings - std::string timestamp1_str = MEOS::Meos::convertEpochToTimestamp(ts1_val); - std::string timestamp2_str = MEOS::Meos::convertEpochToTimestamp(ts2_val); - - // Build temporal geometry WKT strings from coordinates and timestamps - std::string left_geometry_wkt = fmt::format("SRID=4326;Point({} {})@{}", lon1_val, lat1_val, timestamp1_str); - std::string right_geometry_wkt = fmt::format("SRID=4326;Point({} {})@{}", lon2_val, lat2_val, timestamp2_str); - - std::cout << "Built temporal geometries:" << std::endl; - std::cout << "Left: " << left_geometry_wkt << std::endl; - std::cout << "Right: " << right_geometry_wkt << std::endl; - - // Both geometries are temporal points, use temporal-temporal intersection - std::cout << "Using temporal-temporal intersection (eintersects_tgeo_tgeo)" << std::endl; - MEOS::Meos::TemporalGeometry left_temporal(left_geometry_wkt); - if (!left_temporal.getGeometry()) { - std::cout << "TemporalIntersects: left temporal geometry is null" << std::endl; + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) { return 0; } - MEOS::Meos::TemporalGeometry right_temporal(right_geometry_wkt); - if (!right_temporal.getGeometry()) { - std::cout << "TemporalIntersects: right temporal geometry is null" << std::endl; - return 0; - } - int intersection_result = left_temporal.intersects(right_temporal); - std::cout << "eintersects_tgeo_tgeo result: " << intersection_result << std::endl; - - return intersection_result; - } catch (const std::exception& e) { - std::cout << "MEOS exception in temporal geometry intersection: " << e.what() << std::endl; - return -1; // Error case - } catch (...) { - std::cout << "Unknown error in temporal geometry intersection" << std::endl; - return -1; // Error case - } - }, - lon1, lat1, timestamp1, lon2, lat2, timestamp2 - ); - - return VarVal(result); -} -VarVal TemporalIntersectsGeometryPhysicalFunction::executeTemporal4Param(const std::vector& params) const -{ - // Extract values: lon1, lat1, timestamp1, static_geometry_wkt - auto lon1 = params[0].cast>(); - auto lat1 = params[1].cast>(); - auto timestamp1 = params[2].cast>(); - auto static_geometry_varsized = params[3].cast(); - - std::cout << "4-param temporal-static intersection with coordinate values" << std::endl; - - // Call MEOS: eintersects_tgeo_geo(temporal, static) - const auto result = nautilus::invoke( - +[](double lon1_val, double lat1_val, uint64_t ts1_val, const char* static_geom_ptr, uint32_t static_geom_size) -> int { - try { - MEOS::Meos::ensureMeosInitialized(); - if (!(lon1_val >= -180.0 && lon1_val <= 180.0 && lat1_val >= -90.0 && lat1_val <= 90.0)) { - std::cout << "TemporalIntersects: coordinates out of range" << std::endl; + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; - } - // Build temporal point - std::string ts_str = MEOS::Meos::convertEpochToTimestamp(ts1_val); - std::string left_wkt = fmt::format("SRID=4326;Point({} {})@{}", lon1_val, lat1_val, ts_str); - - // Parse static WKT - std::string right_wkt(static_geom_ptr, static_geom_size); - while (!right_wkt.empty() && (right_wkt.front()=='\'' || right_wkt.front()=='"')) right_wkt.erase(right_wkt.begin()); - while (!right_wkt.empty() && (right_wkt.back()=='\'' || right_wkt.back()=='"')) right_wkt.pop_back(); - if (left_wkt.empty() || right_wkt.empty()) return 0; - - MEOS::Meos::TemporalGeometry left(left_wkt); - if (!left.getGeometry()) return 0; - MEOS::Meos::StaticGeometry right(right_wkt); - if (!right.getGeometry()) return 0; - return MEOS::Meos::safe_eintersects_tgeo_geo(static_cast(left.getGeometry()), static_cast(right.getGeometry())); - } catch (...) { return -1; } + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS spatial-relation call — same shape as TemporalEDWithin's + // edwithin_tgeo_geo, but specific MEOS function per generated operator. + // Real MEOS spatial-rel signature: int fn(const Temporal *, const GSERIALIZED *) + // (no `atstart` flag — that's specific to geog_dwithin / edwithin's 3-arg variant). + return intersects_tgeo_geo(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } }, - lon1, lat1, timestamp1, static_geometry_varsized.getContent(), static_geometry_varsized.getContentSize()); - + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + return VarVal(result); } -PhysicalFunctionRegistryReturnType -PhysicalFunctionGeneratedRegistrar::RegisterTemporalIntersectsGeometryPhysicalFunction(PhysicalFunctionRegistryArguments physicalFunctionRegistryArguments) +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalIntersectsGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) { - if (physicalFunctionRegistryArguments.childFunctions.size() == 4) { - return TemporalIntersectsGeometryPhysicalFunction( - physicalFunctionRegistryArguments.childFunctions[0], - physicalFunctionRegistryArguments.childFunctions[1], - physicalFunctionRegistryArguments.childFunctions[2], - physicalFunctionRegistryArguments.childFunctions[3] - ); - } else if (physicalFunctionRegistryArguments.childFunctions.size() == 6) { - return TemporalIntersectsGeometryPhysicalFunction( - physicalFunctionRegistryArguments.childFunctions[0], - physicalFunctionRegistryArguments.childFunctions[1], - physicalFunctionRegistryArguments.childFunctions[2], - physicalFunctionRegistryArguments.childFunctions[3], - physicalFunctionRegistryArguments.childFunctions[4], - physicalFunctionRegistryArguments.childFunctions[5] - ); - } else { - PRECONDITION(false, "TemporalIntersectsGeometryPhysicalFunction requires 4 or 6 child functions, but got {}", physicalFunctionRegistryArguments.childFunctions.size()); - } + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalIntersectsGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalIntersectsGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); } -} +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalLePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalLePhysicalFunction.cpp new file mode 100644 index 0000000000..9cc7a0fd36 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalLePhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalLePhysicalFunction::TemporalLePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalLePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_le(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalLePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalLePhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalLePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalLtPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalLtPhysicalFunction.cpp new file mode 100644 index 0000000000..b77746e36d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalLtPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalLtPhysicalFunction::TemporalLtPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalLtPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_lt(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalLtPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalLtPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalLtPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalMinusGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalMinusGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..f0b5ff6ead --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalMinusGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalMinusGeometryPhysicalFunction::TemporalMinusGeometryPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalMinusGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string temporalGeometryWkt = fmt::format("SRID=4326;Point({} {})@{}", lonValue, latValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (temporalGeometryWkt.empty() || staticGeometryWkt.empty()) return 0; + + MEOS::Meos::TemporalGeometry temporalGeometry(temporalGeometryWkt); + if (!temporalGeometry.getGeometry()) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) return 0; + + // MEOS restriction call — returns Temporal* (non-null if the + // input survived the restriction, null if clipped/empty). + // For per-event single-instant inputs this collapses to a + // filter predicate: 1 if the point survives, 0 if clipped. + Temporal* clipped = tgeo_minus_geom(temporalGeometry.getGeometry(), + staticGeometry.getGeometry()); + if (clipped == nullptr) return 0; + free(clipped); + return 1; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalMinusGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalMinusGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalMinusGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.cpp new file mode 100644 index 0000000000..46e88bba4c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADFloatScalarPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADFloatScalarPhysicalFunction::TemporalNADFloatScalarPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TemporalNADFloatScalarPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = nad_tfloat_float(temp, threshold); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADFloatScalarPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TemporalNADFloatScalarPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TemporalNADFloatScalarPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..8165753961 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADGeometryPhysicalFunction::TemporalNADGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return nad_tgeo_geo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalNADGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalNADGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADIntScalarPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADIntScalarPhysicalFunction.cpp new file mode 100644 index 0000000000..d80e389e35 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADIntScalarPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADIntScalarPhysicalFunction::TemporalNADIntScalarPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction thresholdFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(thresholdFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TemporalNADIntScalarPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + parameterValues.emplace_back(function.execute(record, arena)); + + auto value = parameterValues[0].cast>(); + auto threshold = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, double threshold, uint64_t ts) -> double { + try { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", static_cast(value), MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + int r = nad_tint_int(temp, static_cast(threshold)); + free(temp); + return static_cast(r); + } catch (const std::exception&) { return 0.0; } + }, + value, threshold, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADIntScalarPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TemporalNADIntScalarPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TemporalNADIntScalarPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..20ead14dad --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferCbufferPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADTCbufferCbufferPhysicalFunction::TemporalNADTCbufferCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction cbufLitFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(cbufLitFunction)); +} + +VarVal TemporalNADTCbufferCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto cbufLit = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* cbufLitPtr, + uint32_t cbufLitSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string cbufferLiteral(cbufLitPtr, cbufLitSize); + + while (!cbufferLiteral.empty() && (cbufferLiteral.front() == '\'' || cbufferLiteral.front() == '"')) + cbufferLiteral.erase(cbufferLiteral.begin()); + while (!cbufferLiteral.empty() && (cbufferLiteral.back() == '\'' || cbufferLiteral.back() == '"')) + cbufferLiteral.pop_back(); + + if (tcbufferWkt.empty() || cbufferLiteral.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + Cbuffer* cb = cbuffer_in(cbufferLiteral.c_str()); + if (!cb) { free(tcbuffer); return 0; } + + double r = nad_tcbuffer_cbuffer(tcbuffer, cb); + free(tcbuffer); + free(cb); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, cbufLit.getContent(), cbufLit.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTCbufferCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalNADTCbufferCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalNADTCbufferCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..20e2a8f9a2 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferPhysicalFunction.cpp @@ -0,0 +1,125 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADTCbufferPhysicalFunction::TemporalNADTCbufferPhysicalFunction(PhysicalFunction lonFunction, + PhysicalFunction latFunction, + PhysicalFunction radiusFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(lonFunction)); + parameterFunctions.push_back(std::move(latFunction)); + parameterFunctions.push_back(std::move(radiusFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalNADTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lon = parameterValues[0].cast>(); + auto lat = parameterValues[1].cast>(); + auto radius = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double lonValue, + double latValue, + double radiusValue, + uint64_t timestampValue, + const char* geometryPtr, + uint32_t geometrySize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonValue >= -180.0 && lonValue <= 180.0 && latValue >= -90.0 && latValue <= 90.0)) return 0; + if (radiusValue < 0.0) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tcbufferWkt = fmt::format("Cbuffer(Point({} {}),{})@{}", + lonValue, latValue, radiusValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tcbufferWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tcbuffer = tcbuffer_in(tcbufferWkt.c_str()); + if (!tcbuffer) return 0; + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tcbuffer); return 0; } + + double r = nad_tcbuffer_geo(tcbuffer, staticGeometry.getGeometry()); + free(tcbuffer); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lon, lat, radius, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalNADTCbufferPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalNADTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.cpp new file mode 100644 index 0000000000..a2703901eb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTCbufferTCbufferPhysicalFunction.cpp @@ -0,0 +1,127 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADTCbufferTCbufferPhysicalFunction::TemporalNADTCbufferTCbufferPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction radiusAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction radiusBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(radiusAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(radiusBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADTCbufferTCbufferPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto radiusA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto lonB = parameterValues[4].cast>(); + auto latB = parameterValues[5].cast>(); + auto radiusB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, double radiusAValue, uint64_t tsAValue, + double lonBValue, double latBValue, double radiusBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + if (radiusAValue < 0.0 || radiusBValue < 0.0) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("Cbuffer(Point({} {}),{})@{}", lonAValue, latAValue, radiusAValue, tsAString); + std::string wktB = fmt::format("Cbuffer(Point({} {}),{})@{}", lonBValue, latBValue, radiusBValue, tsBString); + + Temporal* tA = tcbuffer_in(wktA.c_str()); + if (!tA) return 0; + Temporal* tB = tcbuffer_in(wktB.c_str()); + if (!tB) { free(tA); return 0; } + + double r = nad_tcbuffer_tcbuffer(tA, tB); + free(tA); + free(tB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTCbufferTCbufferPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalNADTCbufferTCbufferPhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalNADTCbufferTCbufferPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTFloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTFloatPhysicalFunction.cpp new file mode 100644 index 0000000000..480497c990 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTFloatPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADTFloatPhysicalFunction::TemporalNADTFloatPhysicalFunction(PhysicalFunction valueAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction valueBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(valueAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(valueBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADTFloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto valueA = parameterValues[0].cast>(); + auto tsA = parameterValues[1].cast>(); + auto valueB = parameterValues[2].cast>(); + auto tsB = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](double valueAValue, uint64_t tsAValue, + double valueBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + const std::string tsAStr = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBStr = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("{}@{}", valueAValue, tsAStr); + std::string wktB = fmt::format("{}@{}", valueBValue, tsBStr); + Temporal* tempA = tfloat_in(wktA.c_str()); + if (!tempA) return 0.0; + Temporal* tempB = tfloat_in(wktB.c_str()); + if (!tempB) { free(tempA); return 0.0; } + double r = nad_tfloat_tfloat(tempA, tempB); + free(tempA); + free(tempB); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + valueA, tsA, valueB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTFloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalNADTFloatPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalNADTFloatPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..5afa3d52bc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTGeometryPhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADTGeometryPhysicalFunction::TemporalNADTGeometryPhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADTGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return nad_tgeo_tgeo(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalNADTGeometryPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalNADTGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTIntPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTIntPhysicalFunction.cpp new file mode 100644 index 0000000000..6347cf8cbe --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTIntPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNADTIntPhysicalFunction::TemporalNADTIntPhysicalFunction(PhysicalFunction valueAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction valueBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(valueAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(valueBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADTIntPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto valueA = parameterValues[0].cast>(); + auto tsA = parameterValues[1].cast>(); + auto valueB = parameterValues[2].cast>(); + auto tsB = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t valueAValue, uint64_t tsAValue, + int32_t valueBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + const std::string tsAStr = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBStr = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string wktA = fmt::format("{}@{}", valueAValue, tsAStr); + std::string wktB = fmt::format("{}@{}", valueBValue, tsBStr); + Temporal* tempA = tint_in(wktA.c_str()); + if (!tempA) return 0; + Temporal* tempB = tint_in(wktB.c_str()); + if (!tempB) { free(tempA); return 0; } + int r = nad_tint_tint(tempA, tempB); + free(tempA); + free(tempB); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + valueA, tsA, valueB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTIntPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalNADTIntPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalNADTIntPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..0fcdb346b0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTNpointGeometryPhysicalFunction.cpp @@ -0,0 +1,118 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalNADTNpointGeometryPhysicalFunction::TemporalNADTNpointGeometryPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fractionFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fractionFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalNADTNpointGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto fraction = parameterValues[1].cast>(); + auto timestamp = parameterValues[2].cast>(); + auto geometry = parameterValues[3].cast(); + + const auto result = nautilus::invoke( + +[](uint64_t ridValue, double fractionValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tnpointWkt = fmt::format("NPoint({}, {})@{}", ridValue, fractionValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tnpointWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tnpoint = tnpoint_in(tnpointWkt.c_str()); + if (!tnpoint) return 0; + Temporal* tgeo = tnpoint_to_tgeompoint(tnpoint); + if (!tgeo) { free(tnpoint); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tnpoint); return 0; } + + double r = nad_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tnpoint); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + rid, fraction, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTNpointGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TemporalNADTNpointGeometryPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TemporalNADTNpointGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.cpp new file mode 100644 index 0000000000..7a983a6778 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTNpointTNpointPhysicalFunction.cpp @@ -0,0 +1,126 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalNADTNpointTNpointPhysicalFunction::TemporalNADTNpointTNpointPhysicalFunction(PhysicalFunction ridAFunction, + PhysicalFunction fractionAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction ridBFunction, + PhysicalFunction fractionBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(ridAFunction)); + parameterFunctions.push_back(std::move(fractionAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(ridBFunction)); + parameterFunctions.push_back(std::move(fractionBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADTNpointTNpointPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto ridA = parameterValues[0].cast>(); + auto fractionA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto ridB = parameterValues[3].cast>(); + auto fractionB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t ridAValue, double fractionAValue, uint64_t tsAValue, + uint64_t ridBValue, double fractionBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tnpointAWkt = fmt::format("NPoint({}, {})@{}", ridAValue, fractionAValue, tsAString); + std::string tnpointBWkt = fmt::format("NPoint({}, {})@{}", ridBValue, fractionBValue, tsBString); + + if (tnpointAWkt.empty() || tnpointBWkt.empty()) return 0; + + Temporal* tnpointA = tnpoint_in(tnpointAWkt.c_str()); + if (!tnpointA) return 0; + Temporal* tgeoA = tnpoint_to_tgeompoint(tnpointA); + if (!tgeoA) { free(tnpointA); return 0; } + Temporal* tnpointB = tnpoint_in(tnpointBWkt.c_str()); + if (!tnpointB) { free(tgeoA); free(tnpointA); return 0; } + Temporal* tgeoB = tnpoint_to_tgeompoint(tnpointB); + if (!tgeoB) { free(tnpointB); free(tgeoA); free(tnpointA); return 0; } + + double r = nad_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tnpointB); + free(tgeoA); + free(tnpointA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + ridA, fractionA, tsA, ridB, fractionB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTNpointTNpointPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalNADTNpointTNpointPhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalNADTNpointTNpointPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.cpp new file mode 100644 index 0000000000..2a01203e48 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTPoseGeometryPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalNADTPoseGeometryPhysicalFunction::TemporalNADTPoseGeometryPhysicalFunction(PhysicalFunction xFunction, + PhysicalFunction yFunction, + PhysicalFunction thetaFunction, + PhysicalFunction timestampFunction, + PhysicalFunction geometryFunction) +{ + parameterFunctions.reserve(5); + parameterFunctions.push_back(std::move(xFunction)); + parameterFunctions.push_back(std::move(yFunction)); + parameterFunctions.push_back(std::move(thetaFunction)); + parameterFunctions.push_back(std::move(timestampFunction)); + parameterFunctions.push_back(std::move(geometryFunction)); +} + +VarVal TemporalNADTPoseGeometryPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto x = parameterValues[0].cast>(); + auto y = parameterValues[1].cast>(); + auto theta = parameterValues[2].cast>(); + auto timestamp = parameterValues[3].cast>(); + auto geometry = parameterValues[4].cast(); + + const auto result = nautilus::invoke( + +[](double xValue, double yValue, double thetaValue, uint64_t timestampValue, + const char* geometryPtr, uint32_t geometrySize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xValue >= -180.0 && xValue <= 180.0 && yValue >= -90.0 && yValue <= 90.0)) return 0; + + const std::string timestampString = MEOS::Meos::convertEpochToTimestamp(timestampValue); + std::string tposeWkt = fmt::format("Pose(Point({} {}), {})@{}", + xValue, yValue, thetaValue, timestampString); + std::string staticGeometryWkt(geometryPtr, geometrySize); + + while (!staticGeometryWkt.empty() && (staticGeometryWkt.front() == '\'' || staticGeometryWkt.front() == '"')) + staticGeometryWkt.erase(staticGeometryWkt.begin()); + while (!staticGeometryWkt.empty() && (staticGeometryWkt.back() == '\'' || staticGeometryWkt.back() == '"')) + staticGeometryWkt.pop_back(); + + if (tposeWkt.empty() || staticGeometryWkt.empty()) return 0; + + Temporal* tpose = tpose_in(tposeWkt.c_str()); + if (!tpose) return 0; + Temporal* tgeo = tpose_to_tpoint(tpose); + if (!tgeo) { free(tpose); return 0; } + MEOS::Meos::StaticGeometry staticGeometry(staticGeometryWkt); + if (!staticGeometry.getGeometry()) { free(tgeo); free(tpose); return 0; } + + double r = nad_tgeo_geo(tgeo, staticGeometry.getGeometry()); + free(tgeo); + free(tpose); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + x, y, theta, timestamp, geometry.getContent(), geometry.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTPoseGeometryPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 5, + "TemporalNADTPoseGeometryPhysicalFunction requires 5 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + return TemporalNADTPoseGeometryPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.cpp new file mode 100644 index 0000000000..8e657790aa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNADTPoseTPosePhysicalFunction.cpp @@ -0,0 +1,136 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +#include +} + +namespace NES { + +TemporalNADTPoseTPosePhysicalFunction::TemporalNADTPoseTPosePhysicalFunction(PhysicalFunction xAFunction, + PhysicalFunction yAFunction, + PhysicalFunction thetaAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction xBFunction, + PhysicalFunction yBFunction, + PhysicalFunction thetaBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(8); + parameterFunctions.push_back(std::move(xAFunction)); + parameterFunctions.push_back(std::move(yAFunction)); + parameterFunctions.push_back(std::move(thetaAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(xBFunction)); + parameterFunctions.push_back(std::move(yBFunction)); + parameterFunctions.push_back(std::move(thetaBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNADTPoseTPosePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto xA = parameterValues[0].cast>(); + auto yA = parameterValues[1].cast>(); + auto thetaA = parameterValues[2].cast>(); + auto tsA = parameterValues[3].cast>(); + auto xB = parameterValues[4].cast>(); + auto yB = parameterValues[5].cast>(); + auto thetaB = parameterValues[6].cast>(); + auto tsB = parameterValues[7].cast>(); + + const auto result = nautilus::invoke( + +[](double xAValue, double yAValue, double thetaAValue, uint64_t tsAValue, + double xBValue, double yBValue, double thetaBValue, uint64_t tsBValue) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(xAValue >= -180.0 && xAValue <= 180.0 && yAValue >= -90.0 && yAValue <= 90.0)) return 0; + if (!(xBValue >= -180.0 && xBValue <= 180.0 && yBValue >= -90.0 && yBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string tposeAWkt = fmt::format("Pose(Point({} {}), {})@{}", xAValue, yAValue, thetaAValue, tsAString); + std::string tposeBWkt = fmt::format("Pose(Point({} {}), {})@{}", xBValue, yBValue, thetaBValue, tsBString); + + if (tposeAWkt.empty() || tposeBWkt.empty()) return 0; + + Temporal* tposeA = tpose_in(tposeAWkt.c_str()); + if (!tposeA) return 0; + Temporal* tgeoA = tpose_to_tpoint(tposeA); + if (!tgeoA) { free(tposeA); return 0; } + Temporal* tposeB = tpose_in(tposeBWkt.c_str()); + if (!tposeB) { free(tgeoA); free(tposeA); return 0; } + Temporal* tgeoB = tpose_to_tpoint(tposeB); + if (!tgeoB) { free(tposeB); free(tgeoA); free(tposeA); return 0; } + + double r = nad_tgeo_tgeo(tgeoA, tgeoB); + free(tgeoB); + free(tposeB); + free(tgeoA); + free(tposeA); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + xA, yA, thetaA, tsA, xB, yB, thetaB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNADTPoseTPosePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 8, + "TemporalNADTPoseTPosePhysicalFunction requires 8 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + auto arg6 = std::move(arguments.childFunctions[6]); + auto arg7 = std::move(arguments.childFunctions[7]); + return TemporalNADTPoseTPosePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalNePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalNePhysicalFunction.cpp new file mode 100644 index 0000000000..c52e63aed0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalNePhysicalFunction.cpp @@ -0,0 +1,117 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalNePhysicalFunction::TemporalNePhysicalFunction(PhysicalFunction lonAFunction, + PhysicalFunction latAFunction, + PhysicalFunction tsAFunction, + PhysicalFunction lonBFunction, + PhysicalFunction latBFunction, + PhysicalFunction tsBFunction) +{ + parameterFunctions.reserve(6); + parameterFunctions.push_back(std::move(lonAFunction)); + parameterFunctions.push_back(std::move(latAFunction)); + parameterFunctions.push_back(std::move(tsAFunction)); + parameterFunctions.push_back(std::move(lonBFunction)); + parameterFunctions.push_back(std::move(latBFunction)); + parameterFunctions.push_back(std::move(tsBFunction)); +} + +VarVal TemporalNePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto lonA = parameterValues[0].cast>(); + auto latA = parameterValues[1].cast>(); + auto tsA = parameterValues[2].cast>(); + auto lonB = parameterValues[3].cast>(); + auto latB = parameterValues[4].cast>(); + auto tsB = parameterValues[5].cast>(); + + const auto result = nautilus::invoke( + +[](double lonAValue, double latAValue, uint64_t tsAValue, + double lonBValue, double latBValue, uint64_t tsBValue) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (!(lonAValue >= -180.0 && lonAValue <= 180.0 && latAValue >= -90.0 && latAValue <= 90.0)) return 0; + if (!(lonBValue >= -180.0 && lonBValue <= 180.0 && latBValue >= -90.0 && latBValue <= 90.0)) return 0; + + const std::string tsAString = MEOS::Meos::convertEpochToTimestamp(tsAValue); + const std::string tsBString = MEOS::Meos::convertEpochToTimestamp(tsBValue); + std::string temporalGeometryAWkt = fmt::format("SRID=4326;Point({} {})@{}", lonAValue, latAValue, tsAString); + std::string temporalGeometryBWkt = fmt::format("SRID=4326;Point({} {})@{}", lonBValue, latBValue, tsBString); + + MEOS::Meos::TemporalGeometry temporalGeometryA(temporalGeometryAWkt); + if (!temporalGeometryA.getGeometry()) return 0; + MEOS::Meos::TemporalGeometry temporalGeometryB(temporalGeometryBWkt); + if (!temporalGeometryB.getGeometry()) return 0; + + // MEOS *_tgeo_tgeo spatial-relation: int fn(const Temporal*, const Temporal*). + return temporal_ne(temporalGeometryA.getGeometry(), + temporalGeometryB.getGeometry()); + } + catch (const std::exception&) + { + return 0; + } + }, + lonA, latA, tsA, lonB, latB, tsB); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalNePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 6, + "TemporalNePhysicalFunction requires 6 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + auto arg4 = std::move(arguments.childFunctions[4]); + auto arg5 = std::move(arguments.childFunctions[5]); + return TemporalNePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TemporalRoundPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TemporalRoundPhysicalFunction.cpp new file mode 100644 index 0000000000..9c2163e95e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TemporalRoundPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TemporalRoundPhysicalFunction::TemporalRoundPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TemporalRoundPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = temporal_round(temp, static_cast(arg0)); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTemporalRoundPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TemporalRoundPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TemporalRoundPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TeqBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..5a930cea4e --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqBoolTboolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TeqBoolTboolPhysicalFunction::TeqBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TeqBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = teq_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTeqBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TeqBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TeqBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TeqTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TeqTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..68acca4fa7 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TeqTboolBoolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TeqTboolBoolPhysicalFunction::TeqTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TeqTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = teq_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTeqTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TeqTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TeqTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TextInitcapPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TextInitcapPhysicalFunction.cpp new file mode 100644 index 0000000000..8fdbcf15c3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TextInitcapPhysicalFunction.cpp @@ -0,0 +1,104 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TextInitcapPhysicalFunction::TextInitcapPhysicalFunction(PhysicalFunction strFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(strFunction)); +} + +VarVal TextInitcapPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto str = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* strPtr, uint32_t strSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempRawStr(strPtr, strSize); + while (!tempRawStr.empty() && (tempRawStr.front() == '\'' || tempRawStr.front() == '"')) tempRawStr.erase(tempRawStr.begin()); + while (!tempRawStr.empty() && (tempRawStr.back() == '\'' || tempRawStr.back() == '"')) tempRawStr.pop_back(); + text* temp = cstring_to_text(tempRawStr.c_str()); + if (!temp) return 0u; + + text* tres = text_initcap(temp); + free(temp); + if (!tres) return 0u; + char* out = text_to_cstring(tres); + free(tres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + str.getContent(), str.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTextInitcapPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "TextInitcapPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return TextInitcapPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TextLowerPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TextLowerPhysicalFunction.cpp new file mode 100644 index 0000000000..4d34513adc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TextLowerPhysicalFunction.cpp @@ -0,0 +1,104 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TextLowerPhysicalFunction::TextLowerPhysicalFunction(PhysicalFunction strFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(strFunction)); +} + +VarVal TextLowerPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto str = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* strPtr, uint32_t strSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempRawStr(strPtr, strSize); + while (!tempRawStr.empty() && (tempRawStr.front() == '\'' || tempRawStr.front() == '"')) tempRawStr.erase(tempRawStr.begin()); + while (!tempRawStr.empty() && (tempRawStr.back() == '\'' || tempRawStr.back() == '"')) tempRawStr.pop_back(); + text* temp = cstring_to_text(tempRawStr.c_str()); + if (!temp) return 0u; + + text* tres = text_lower(temp); + free(temp); + if (!tres) return 0u; + char* out = text_to_cstring(tres); + free(tres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + str.getContent(), str.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTextLowerPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "TextLowerPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return TextLowerPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TextUpperPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TextUpperPhysicalFunction.cpp new file mode 100644 index 0000000000..19fae5f4a5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TextUpperPhysicalFunction.cpp @@ -0,0 +1,104 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TextUpperPhysicalFunction::TextUpperPhysicalFunction(PhysicalFunction strFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(strFunction)); +} + +VarVal TextUpperPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto str = parameterValues[0].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* strPtr, uint32_t strSize, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempRawStr(strPtr, strSize); + while (!tempRawStr.empty() && (tempRawStr.front() == '\'' || tempRawStr.front() == '"')) tempRawStr.erase(tempRawStr.begin()); + while (!tempRawStr.empty() && (tempRawStr.back() == '\'' || tempRawStr.back() == '"')) tempRawStr.pop_back(); + text* temp = cstring_to_text(tempRawStr.c_str()); + if (!temp) return 0u; + + text* tres = text_upper(temp); + free(temp); + if (!tres) return 0u; + char* out = text_to_cstring(tres); + free(tres); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + str.getContent(), str.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTextUpperPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "TextUpperPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return TextUpperPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TextcatTextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TextcatTextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..6d7e02ea5d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TextcatTextTtextPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TextcatTextTtextPhysicalFunction::TextcatTextTtextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TextcatTextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0u; } + + Temporal* tres = textcat_text_ttext(txt0, temp); + free(temp); + free(txt0); + if (!tres) return 0u; + text* txt = ttext_start_value(tres); + free(tres); + if (!txt) return 0u; + char* out = text_to_cstring(txt); + free(txt); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTextcatTextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TextcatTextTtextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TextcatTextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TextcatTtextTextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TextcatTtextTextPhysicalFunction.cpp new file mode 100644 index 0000000000..58e775c2d9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TextcatTtextTextPhysicalFunction.cpp @@ -0,0 +1,124 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TextcatTtextTextPhysicalFunction::TextcatTtextTextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TextcatTtextTextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* arg0Ptr, uint32_t arg0Size, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0u; + std::string arg0S(arg0Ptr, arg0Size); + while (!arg0S.empty() && (arg0S.front() == '\'' || arg0S.front() == '"')) arg0S.erase(arg0S.begin()); + while (!arg0S.empty() && (arg0S.back() == '\'' || arg0S.back() == '"')) arg0S.pop_back(); + text* txt0 = cstring_to_text(arg0S.c_str()); + if (!txt0) { free(temp); return 0u; } + + Temporal* tres = textcat_ttext_text(temp, txt0); + free(temp); + free(txt0); + if (!tres) return 0u; + text* txt = ttext_start_value(tres); + free(tres); + if (!txt) return 0u; + char* out = text_to_cstring(txt); + free(txt); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + value.getContent(), value.getContentSize(), ts, arg0.getContent(), arg0.getContentSize(), outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTextcatTtextTextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TextcatTtextTextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TextcatTtextTextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TextcatTtextTtextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TextcatTtextTtextPhysicalFunction.cpp new file mode 100644 index 0000000000..b38c9f822d --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TextcatTtextTtextPhysicalFunction.cpp @@ -0,0 +1,130 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TextcatTtextTtextPhysicalFunction::TextcatTtextTtextPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction tval0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(tval0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal TextcatTtextTtextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + auto tval0 = parameterValues[2].cast(); + auto ts0 = parameterValues[3].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + const char* tval0Ptr, uint32_t tval0Size, + uint64_t ts0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0u; + std::string tval0S(tval0Ptr, tval0Size); + while (!tval0S.empty() && (tval0S.front() == '\'' || tval0S.front() == '"')) tval0S.erase(tval0S.begin()); + while (!tval0S.empty() && (tval0S.back() == '\'' || tval0S.back() == '"')) tval0S.pop_back(); + std::string tval0Wkt = "'" + tval0S + "'@" + MEOS::Meos::convertEpochToTimestamp(ts0); + Temporal* inst0 = ttext_in(tval0Wkt.c_str()); + if (!inst0) { free(temp); return 0u; } + + Temporal* tres = textcat_ttext_ttext(temp, inst0); + free(temp); + free(inst0); + if (!tres) return 0u; + text* txt = ttext_start_value(tres); + free(tres); + if (!txt) return 0u; + char* out = text_to_cstring(txt); + free(txt); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + value.getContent(), value.getContentSize(), ts, tval0.getContent(), tval0.getContentSize(), ts0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTextcatTtextTtextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TextcatTtextTtextPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TextcatTtextTtextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatCeilPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatCeilPhysicalFunction.cpp new file mode 100644 index 0000000000..6b71aa471c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatCeilPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatCeilPhysicalFunction::TfloatCeilPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatCeilPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_ceil(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatCeilPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatCeilPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatCeilPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatExpPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatExpPhysicalFunction.cpp new file mode 100644 index 0000000000..c531b724e1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatExpPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatExpPhysicalFunction::TfloatExpPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatExpPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_exp(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatExpPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatExpPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatExpPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatFloorPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatFloorPhysicalFunction.cpp new file mode 100644 index 0000000000..1ae0585080 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatFloorPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatFloorPhysicalFunction::TfloatFloorPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatFloorPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_floor(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatFloorPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatFloorPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatFloorPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatLnPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatLnPhysicalFunction.cpp new file mode 100644 index 0000000000..06280a0083 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatLnPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatLnPhysicalFunction::TfloatLnPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatLnPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_ln(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatLnPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatLnPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatLnPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatLog10PhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatLog10PhysicalFunction.cpp new file mode 100644 index 0000000000..550f333667 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatLog10PhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatLog10PhysicalFunction::TfloatLog10PhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatLog10PhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_log10(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatLog10PhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatLog10PhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatLog10PhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatRadiansPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatRadiansPhysicalFunction.cpp new file mode 100644 index 0000000000..d5afc7a083 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatRadiansPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatRadiansPhysicalFunction::TfloatRadiansPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatRadiansPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_radians(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatRadiansPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatRadiansPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatRadiansPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatScaleValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatScaleValuePhysicalFunction.cpp new file mode 100644 index 0000000000..f0f90887cc --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatScaleValuePhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatScaleValuePhysicalFunction::TfloatScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TfloatScaleValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_scale_value(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatScaleValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TfloatScaleValuePhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TfloatScaleValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.cpp new file mode 100644 index 0000000000..06afaa9b89 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatShiftScaleValuePhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatShiftScaleValuePhysicalFunction::TfloatShiftScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal TfloatShiftScaleValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + auto arg1 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0, + double arg1) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_shift_scale_value(temp, arg0, arg1); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0, arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatShiftScaleValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TfloatShiftScaleValuePhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TfloatShiftScaleValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatShiftValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatShiftValuePhysicalFunction.cpp new file mode 100644 index 0000000000..ef973d75d9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatShiftValuePhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatShiftValuePhysicalFunction::TfloatShiftValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TfloatShiftValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_shift_value(temp, arg0); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatShiftValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TfloatShiftValuePhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TfloatShiftValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatToTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatToTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..2328c60a8c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatToTbigintPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatToTbigintPhysicalFunction::TfloatToTbigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatToTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tfloat_to_tbigint(temp); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatToTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatToTbigintPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatToTbigintPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TfloatToTintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TfloatToTintPhysicalFunction.cpp new file mode 100644 index 0000000000..d4ee0b491c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TfloatToTintPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TfloatToTintPhysicalFunction::TfloatToTintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TfloatToTintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tfloat_to_tint(temp); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTfloatToTintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TfloatToTintPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TfloatToTintPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.cpp new file mode 100644 index 0000000000..a2a8065f9c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexAreNeighborCellsPhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexAreNeighborCellsPhysicalFunction::Th3indexAreNeighborCellsPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction cell0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(cell0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal Th3indexAreNeighborCellsPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto cell0 = parameterValues[2].cast>(); + auto ts0 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t cell0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + Temporal* inst0 = th3indexinst_make((H3Index)cell0, (TimestampTz)ts0); + if (!inst0) { free(temp); return 0.0; } + + double r = th3index_are_neighbor_cells(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, cell0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexAreNeighborCellsPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "Th3indexAreNeighborCellsPhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return Th3indexAreNeighborCellsPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.cpp new file mode 100644 index 0000000000..8e7e3486fa --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildNextPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexCellToCenterChildNextPhysicalFunction::Th3indexCellToCenterChildNextPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal Th3indexCellToCenterChildNextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0u; + + Temporal* tres = th3index_cell_to_center_child_next(temp, (int32_t)arg0); + free(temp); + if (!tres) return 0u; + H3Index hcell = th3index_start_value(tres); + free(tres); + char* hex = h3index_out(hcell); + if (!hex) return 0u; + uint32_t len = static_cast(strlen(hex)); + if (len > bufMax) len = bufMax; + memcpy(buf, hex, len); + free(hex); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, ts, arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexCellToCenterChildNextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "Th3indexCellToCenterChildNextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return Th3indexCellToCenterChildNextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.cpp new file mode 100644 index 0000000000..c49d83afc5 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexCellToCenterChildPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexCellToCenterChildPhysicalFunction::Th3indexCellToCenterChildPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal Th3indexCellToCenterChildPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0u; + + Temporal* tres = th3index_cell_to_center_child(temp, (int32_t)arg0); + free(temp); + if (!tres) return 0u; + H3Index hcell = th3index_start_value(tres); + free(tres); + char* hex = h3index_out(hcell); + if (!hex) return 0u; + uint32_t len = static_cast(strlen(hex)); + if (len > bufMax) len = bufMax; + memcpy(buf, hex, len); + free(hex); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, ts, arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexCellToCenterChildPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "Th3indexCellToCenterChildPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return Th3indexCellToCenterChildPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.cpp new file mode 100644 index 0000000000..8f2ed670cb --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexCellToChildPosPhysicalFunction.cpp @@ -0,0 +1,97 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexCellToChildPosPhysicalFunction::Th3indexCellToChildPosPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal Th3indexCellToChildPosPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + double arg0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = th3index_cell_to_child_pos(temp, (int32_t)arg0); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexCellToChildPosPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "Th3indexCellToChildPosPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return Th3indexCellToChildPosPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.cpp new file mode 100644 index 0000000000..af3cc07843 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexCellToParentNextPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexCellToParentNextPhysicalFunction::Th3indexCellToParentNextPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal Th3indexCellToParentNextPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0u; + + Temporal* tres = th3index_cell_to_parent_next(temp, (int32_t)arg0); + free(temp); + if (!tres) return 0u; + H3Index hcell = th3index_start_value(tres); + free(tres); + char* hex = h3index_out(hcell); + if (!hex) return 0u; + uint32_t len = static_cast(strlen(hex)); + if (len > bufMax) len = bufMax; + memcpy(buf, hex, len); + free(hex); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, ts, arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexCellToParentNextPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "Th3indexCellToParentNextPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return Th3indexCellToParentNextPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexCellToParentPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexCellToParentPhysicalFunction.cpp new file mode 100644 index 0000000000..af11af8eee --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexCellToParentPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexCellToParentPhysicalFunction::Th3indexCellToParentPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal Th3indexCellToParentPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + double arg0, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0u; + + Temporal* tres = th3index_cell_to_parent(temp, (int32_t)arg0); + free(temp); + if (!tres) return 0u; + H3Index hcell = th3index_start_value(tres); + free(tres); + char* hex = h3index_out(hcell); + if (!hex) return 0u; + uint32_t len = static_cast(strlen(hex)); + if (len > bufMax) len = bufMax; + memcpy(buf, hex, len); + free(hex); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + cell, ts, arg0, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexCellToParentPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "Th3indexCellToParentPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return Th3indexCellToParentPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.cpp new file mode 100644 index 0000000000..a34af5b3a9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexGetBaseCellNumberPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexGetBaseCellNumberPhysicalFunction::Th3indexGetBaseCellNumberPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal Th3indexGetBaseCellNumberPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = th3index_get_base_cell_number(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexGetBaseCellNumberPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "Th3indexGetBaseCellNumberPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return Th3indexGetBaseCellNumberPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexGetResolutionPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexGetResolutionPhysicalFunction.cpp new file mode 100644 index 0000000000..03b37a3c57 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexGetResolutionPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexGetResolutionPhysicalFunction::Th3indexGetResolutionPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal Th3indexGetResolutionPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = th3index_get_resolution(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexGetResolutionPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "Th3indexGetResolutionPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return Th3indexGetResolutionPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexGridDistancePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexGridDistancePhysicalFunction.cpp new file mode 100644 index 0000000000..7b2c02c06a --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexGridDistancePhysicalFunction.cpp @@ -0,0 +1,105 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexGridDistancePhysicalFunction::Th3indexGridDistancePhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction, + PhysicalFunction cell0Function, + PhysicalFunction ts0Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(cell0Function)); + parameterFunctions.push_back(std::move(ts0Function)); +} + +VarVal Th3indexGridDistancePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto cell0 = parameterValues[2].cast>(); + auto ts0 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts, + uint64_t cell0, + uint64_t ts0) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + Temporal* inst0 = th3indexinst_make((H3Index)cell0, (TimestampTz)ts0); + if (!inst0) { free(temp); return 0.0; } + + double r = th3index_grid_distance(temp, inst0); + free(temp); + free(inst0); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts, cell0, ts0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexGridDistancePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "Th3indexGridDistancePhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return Th3indexGridDistancePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexIsPentagonPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexIsPentagonPhysicalFunction.cpp new file mode 100644 index 0000000000..9806cc8074 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexIsPentagonPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexIsPentagonPhysicalFunction::Th3indexIsPentagonPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal Th3indexIsPentagonPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = th3index_is_pentagon(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexIsPentagonPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "Th3indexIsPentagonPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return Th3indexIsPentagonPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/Th3indexIsValidCellPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/Th3indexIsValidCellPhysicalFunction.cpp new file mode 100644 index 0000000000..4dc19426a9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/Th3indexIsValidCellPhysicalFunction.cpp @@ -0,0 +1,92 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +Th3indexIsValidCellPhysicalFunction::Th3indexIsValidCellPhysicalFunction(PhysicalFunction cellFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(cellFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal Th3indexIsValidCellPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto cell = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](uint64_t cell, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + Temporal* temp = th3indexinst_make((H3Index)cell, (TimestampTz)ts); + if (!temp) return 0.0; + + double r = th3index_is_valid_cell(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + cell, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTh3indexIsValidCellPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "Th3indexIsValidCellPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return Th3indexIsValidCellPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TintScaleValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TintScaleValuePhysicalFunction.cpp new file mode 100644 index 0000000000..62068e1b76 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TintScaleValuePhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TintScaleValuePhysicalFunction::TintScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TintScaleValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tint_scale_value(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTintScaleValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TintScaleValuePhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TintScaleValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TintShiftScaleValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TintShiftScaleValuePhysicalFunction.cpp new file mode 100644 index 0000000000..8f68bd8399 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TintShiftScaleValuePhysicalFunction.cpp @@ -0,0 +1,106 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TintShiftScaleValuePhysicalFunction::TintShiftScaleValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function, + PhysicalFunction arg1Function) +{ + parameterFunctions.reserve(4); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(arg1Function)); +} + +VarVal TintShiftScaleValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + auto arg1 = parameterValues[3].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0, + int32_t arg1) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tint_shift_scale_value(temp, arg0, arg1); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0, arg1); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTintShiftScaleValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 4, + "TintShiftScaleValuePhysicalFunction requires 4 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + auto arg3 = std::move(arguments.childFunctions[3]); + return TintShiftScaleValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TintShiftValuePhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TintShiftValuePhysicalFunction.cpp new file mode 100644 index 0000000000..946c319688 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TintShiftValuePhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TintShiftValuePhysicalFunction::TintShiftValuePhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TintShiftValuePhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts, + int32_t arg0) -> int { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0; + + Temporal* res = tint_shift_value(temp, arg0); + free(temp); + if (!res) return 0; + int r = tint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTintShiftValuePhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TintShiftValuePhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TintShiftValuePhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TintToTbigintPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TintToTbigintPhysicalFunction.cpp new file mode 100644 index 0000000000..66825ff616 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TintToTbigintPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TintToTbigintPhysicalFunction::TintToTbigintPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TintToTbigintPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](int32_t value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tint_to_tbigint(temp); + free(temp); + if (!res) return 0.0; + double r = tbigint_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTintToTbigintPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TintToTbigintPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TintToTbigintPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TintToTfloatPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TintToTfloatPhysicalFunction.cpp new file mode 100644 index 0000000000..49fe1fb891 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TintToTfloatPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TintToTfloatPhysicalFunction::TintToTfloatPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TintToTfloatPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tfloat_in(tempWkt.c_str()); + if (!temp) return 0.0; + + Temporal* res = tint_to_tfloat(temp); + free(temp); + if (!res) return 0.0; + double r = tfloat_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTintToTfloatPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TintToTfloatPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TintToTfloatPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TneBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..427e0c403b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneBoolTboolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TneBoolTboolPhysicalFunction::TneBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TneBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tne_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTneBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TneBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TneBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TneTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TneTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..edc54aedce --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TneTboolBoolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TneTboolBoolPhysicalFunction::TneTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TneTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tne_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTneTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TneTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TneTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TnotTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TnotTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..5c45d1ade9 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TnotTboolPhysicalFunction.cpp @@ -0,0 +1,96 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TnotTboolPhysicalFunction::TnotTboolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TnotTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tnot_tbool(temp); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTnotTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TnotTboolPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TnotTboolPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TnpointLengthPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TnpointLengthPhysicalFunction.cpp new file mode 100644 index 0000000000..b07d8e1ca1 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TnpointLengthPhysicalFunction.cpp @@ -0,0 +1,99 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TnpointLengthPhysicalFunction::TnpointLengthPhysicalFunction(PhysicalFunction ridFunction, + PhysicalFunction fracFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(ridFunction)); + parameterFunctions.push_back(std::move(fracFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TnpointLengthPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto rid = parameterValues[0].cast>(); + auto frac = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](int64_t rid, + double frac, + uint64_t ts) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + if (frac < 0.0 || frac > 1.0) return 0.0; + std::string tempWkt = fmt::format("NPoint({},{})@{}", rid, frac, MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tnpoint_in(tempWkt.c_str()); + if (!temp) return 0.0; + + double r = tnpoint_length(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + rid, frac, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTnpointLengthPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TnpointLengthPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TnpointLengthPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TorBoolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TorBoolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..478c0c8498 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TorBoolTboolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TorBoolTboolPhysicalFunction::TorBoolTboolPhysicalFunction(PhysicalFunction arg0Function, + PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(arg0Function)); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TorBoolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto arg0 = parameterValues[0].cast>(); + auto value = parameterValues[1].cast>(); + auto ts = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double arg0, + double value, + uint64_t ts) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tor_bool_tbool(static_cast(arg0 != 0.0), temp); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + arg0, value, ts); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTorBoolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TorBoolTboolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TorBoolTboolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TorTboolBoolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TorTboolBoolPhysicalFunction.cpp new file mode 100644 index 0000000000..69b37b5dd0 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TorTboolBoolPhysicalFunction.cpp @@ -0,0 +1,101 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TorTboolBoolPhysicalFunction::TorTboolBoolPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(3); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TorTboolBoolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast>(); + auto ts = parameterValues[1].cast>(); + auto arg0 = parameterValues[2].cast>(); + + const auto result = nautilus::invoke( + +[](double value, + uint64_t ts, + double arg0) -> bool { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempWkt = fmt::format("{}@{}", value != 0.0 ? "t" : "f", MEOS::Meos::convertEpochToTimestamp(ts)); + Temporal* temp = tbool_in(tempWkt.c_str()); + if (!temp) return false; + + Temporal* res = tor_tbool_bool(temp, static_cast(arg0 != 0.0)); + free(temp); + if (!res) return false; + bool r = tbool_start_value(res); + free(res); + return r; + } + catch (const std::exception&) + { + return false; + } + }, + value, ts, arg0); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTorTboolBoolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 3, + "TorTboolBoolPhysicalFunction requires 3 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + auto arg2 = std::move(arguments.childFunctions[2]); + return TorTboolBoolPhysicalFunction(std::move(arg0), std::move(arg1), std::move(arg2)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TorTboolTboolPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TorTboolTboolPhysicalFunction.cpp new file mode 100644 index 0000000000..69b9be7bf3 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TorTboolTboolPhysicalFunction.cpp @@ -0,0 +1,122 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TorTboolTboolPhysicalFunction::TorTboolTboolPhysicalFunction(PhysicalFunction trajFunction, + PhysicalFunction arg0Function) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(trajFunction)); + parameterFunctions.push_back(std::move(arg0Function)); +} + +VarVal TorTboolTboolPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + auto arg0 = parameterValues[1].cast(); + + // Call MEOS f(Temporal*, Temporal*) -> Temporal* over the two hex-WKB + // operands and serialize the result back to hex-WKB inside the invoke; the + // returned heap string is copied into the arena below. Both operands and the + // MEOS result are freed here. + auto hexStr = nautilus::invoke( + +[](const char* aPtr, uint32_t aSize, const char* bPtr, uint32_t bSize) -> char* + { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string aHex(aPtr, aSize); + std::string bHex(bPtr, bSize); + Temporal* a = temporal_from_hexwkb(aHex.c_str()); + if (!a) return (char*) nullptr; + Temporal* b = temporal_from_hexwkb(bHex.c_str()); + if (!b) { free(a); return (char*) nullptr; } + Temporal* res = tor_tbool_tbool(a, b); + free(a); + free(b); + if (!res) return (char*) nullptr; + size_t hexSize = 0; + char* hexOut = temporal_as_hexwkb(res, 0, &hexSize); + free(res); + return hexOut; + } + catch (const std::exception&) + { + return (char*) nullptr; + } + }, + traj.getContent(), traj.getContentSize(), arg0.getContent(), arg0.getContentSize()); + + const auto hexLen = nautilus::invoke( + +[](const char* s) -> uint32_t { return s ? (uint32_t) strlen(s) : (uint32_t) 0; }, + hexStr); + + auto variableSized = arena.allocateVariableSizedData(hexLen); + + nautilus::invoke( + +[](int8_t* dest, const char* s, uint32_t len) -> void + { + if (s) + { + memcpy(dest, s, len); + free((void*) s); + } + }, + variableSized.getContent(), hexStr, hexLen); + + return variableSized; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTorTboolTboolPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TorTboolTboolPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TorTboolTboolPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TpointLengthWkbPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TpointLengthWkbPhysicalFunction.cpp new file mode 100644 index 0000000000..5a4ed7623b --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TpointLengthWkbPhysicalFunction.cpp @@ -0,0 +1,88 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +#include +} + +namespace NES { + +TpointLengthWkbPhysicalFunction::TpointLengthWkbPhysicalFunction(PhysicalFunction trajFunction) +{ + parameterFunctions.reserve(1); + parameterFunctions.push_back(std::move(trajFunction)); +} + +VarVal TpointLengthWkbPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto traj = parameterValues[0].cast(); + + const auto result = nautilus::invoke( + +[](const char* trajPtr, uint32_t trajSize) -> double { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempHex(trajPtr, trajSize); + Temporal* temp = temporal_from_hexwkb(tempHex.c_str()); + if (!temp) return 0.0; + + double r = tpoint_length(temp); + free(temp); + return r; + } + catch (const std::exception&) + { + return 0.0; + } + }, + traj.getContent(), traj.getContentSize()); + + return VarVal(result); +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTpointLengthWkbPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 1, + "TpointLengthWkbPhysicalFunction requires 1 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + return TpointLengthWkbPhysicalFunction(std::move(arg0)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TtextInitcapPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TtextInitcapPhysicalFunction.cpp new file mode 100644 index 0000000000..6f357d71b8 --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TtextInitcapPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TtextInitcapPhysicalFunction::TtextInitcapPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TtextInitcapPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0u; + + Temporal* tres = ttext_initcap(temp); + free(temp); + if (!tres) return 0u; + text* txt = ttext_start_value(tres); + free(tres); + if (!txt) return 0u; + char* out = text_to_cstring(txt); + free(txt); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + value.getContent(), value.getContentSize(), ts, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTtextInitcapPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TtextInitcapPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TtextInitcapPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TtextLowerPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TtextLowerPhysicalFunction.cpp new file mode 100644 index 0000000000..b7450fb40c --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TtextLowerPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TtextLowerPhysicalFunction::TtextLowerPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TtextLowerPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0u; + + Temporal* tres = ttext_lower(temp); + free(temp); + if (!tres) return 0u; + text* txt = ttext_start_value(tres); + free(tres); + if (!txt) return 0u; + char* out = text_to_cstring(txt); + free(txt); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + value.getContent(), value.getContentSize(), ts, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTtextLowerPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TtextLowerPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TtextLowerPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-physical-operators/src/Functions/Meos/TtextUpperPhysicalFunction.cpp b/nes-physical-operators/src/Functions/Meos/TtextUpperPhysicalFunction.cpp new file mode 100644 index 0000000000..dfc34c0add --- /dev/null +++ b/nes-physical-operators/src/Functions/Meos/TtextUpperPhysicalFunction.cpp @@ -0,0 +1,113 @@ +/* + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + https://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +extern "C" { +#include +} + +namespace NES { + +TtextUpperPhysicalFunction::TtextUpperPhysicalFunction(PhysicalFunction valueFunction, + PhysicalFunction tsFunction) +{ + parameterFunctions.reserve(2); + parameterFunctions.push_back(std::move(valueFunction)); + parameterFunctions.push_back(std::move(tsFunction)); +} + +VarVal TtextUpperPhysicalFunction::execute(const Record& record, ArenaRef& arena) const +{ + std::vector parameterValues; + parameterValues.reserve(parameterFunctions.size()); + for (const auto& function : parameterFunctions) + { + parameterValues.emplace_back(function.execute(record, arena)); + } + + auto value = parameterValues[0].cast(); + auto ts = parameterValues[1].cast>(); + + constexpr uint32_t MAX_LEN = 4096; + auto outBuf = arena.allocateVariableSizedData(nautilus::val(MAX_LEN)); + + const auto actualLen = nautilus::invoke( + +[](const char* valuePtr, uint32_t valueSize, + uint64_t ts, + char* buf, + uint32_t bufMax) -> uint32_t { + try + { + MEOS::Meos::ensureMeosInitialized(); + std::string tempVal(valuePtr, valueSize); + while (!tempVal.empty() && (tempVal.front() == '\'' || tempVal.front() == '"')) tempVal.erase(tempVal.begin()); + while (!tempVal.empty() && (tempVal.back() == '\'' || tempVal.back() == '"')) tempVal.pop_back(); + std::string tempWkt = "'" + tempVal + "'@" + MEOS::Meos::convertEpochToTimestamp(ts); + Temporal* temp = ttext_in(tempWkt.c_str()); + if (!temp) return 0u; + + Temporal* tres = ttext_upper(temp); + free(temp); + if (!tres) return 0u; + text* txt = ttext_start_value(tres); + free(tres); + if (!txt) return 0u; + char* out = text_to_cstring(txt); + free(txt); + if (!out) return 0u; + uint32_t len = static_cast(strlen(out)); + if (len > bufMax) len = bufMax; + memcpy(buf, out, len); + free(out); + return len; + } + catch (const std::exception&) + { + return 0u; + } + }, + value.getContent(), value.getContentSize(), ts, outBuf.getContent(), nautilus::val(MAX_LEN)); + + VarVal(actualLen).writeToMemory(outBuf.getReference()); + return outBuf; +} + +PhysicalFunctionRegistryReturnType PhysicalFunctionGeneratedRegistrar::RegisterTtextUpperPhysicalFunction( + PhysicalFunctionRegistryArguments arguments) +{ + PRECONDITION(arguments.childFunctions.size() == 2, + "TtextUpperPhysicalFunction requires 2 children but got {}", + arguments.childFunctions.size()); + auto arg0 = std::move(arguments.childFunctions[0]); + auto arg1 = std::move(arguments.childFunctions[1]); + return TtextUpperPhysicalFunction(std::move(arg0), std::move(arg1)); +} + +} // namespace NES diff --git a/nes-sql-parser/AntlrSQL.g4 b/nes-sql-parser/AntlrSQL.g4 index 256726e087..cb5365b0a3 100644 --- a/nes-sql-parser/AntlrSQL.g4 +++ b/nes-sql-parser/AntlrSQL.g4 @@ -295,7 +295,7 @@ timeUnit: MS timestampParameter: name=identifier; -functionName: IDENTIFIER | AVG | MAX | MIN | SUM | COUNT | MEDIAN | ARRAY_AGG | VAR | TEMPORAL_SEQUENCE | TEMPORAL_EINTERSECTS_GEOMETRY | TEMPORAL_AINTERSECTS_GEOMETRY | TEMPORAL_ECONTAINS_GEOMETRY | EDWITHIN_TGEO_GEO | TGEO_AT_STBOX; +functionName: IDENTIFIER | AVG | MAX | MIN | SUM | COUNT | MEDIAN | ARRAY_AGG | VAR | TEMPORAL_SEQUENCE | TEMPORAL_EINTERSECTS_GEOMETRY | TEMPORAL_AINTERSECTS_GEOMETRY | TEMPORAL_ECONTAINS_GEOMETRY | EDWITHIN_TGEO_GEO | TGEO_AT_STBOX | TFLOAT_CEIL | TFLOAT_EXP | TFLOAT_FLOOR | TFLOAT_LN | TFLOAT_LOG10 | TFLOAT_RADIANS | TFLOAT_TO_TINT | TINT_TO_TFLOAT | ADD_TFLOAT_FLOAT | SUB_TFLOAT_FLOAT | MUL_TFLOAT_FLOAT | DIV_TFLOAT_FLOAT | ADD_TINT_INT | SUB_TINT_INT | MUL_TINT_INT | DIV_TINT_INT | ADD_FLOAT_TFLOAT | SUB_FLOAT_TFLOAT | MUL_FLOAT_TFLOAT | DIV_FLOAT_TFLOAT | ADD_INT_TINT | SUB_INT_TINT | MUL_INT_TINT | DIV_INT_TINT | ADD_TBIGINT_BIGINT | SUB_TBIGINT_BIGINT | MUL_TBIGINT_BIGINT | DIV_TBIGINT_BIGINT | ADD_BIGINT_TBIGINT | SUB_BIGINT_TBIGINT | MUL_BIGINT_TBIGINT | DIV_BIGINT_TBIGINT | ADD_TNUMBER_TNUMBER | SUB_TNUMBER_TNUMBER | MUL_TNUMBER_TNUMBER | DIV_TNUMBER_TNUMBER | TFLOAT_SHIFT_VALUE | TFLOAT_SCALE_VALUE | TFLOAT_SHIFT_SCALE_VALUE | TINT_SHIFT_VALUE | TINT_SCALE_VALUE | TINT_SHIFT_SCALE_VALUE | TBIGINT_SHIFT_VALUE | TBIGINT_SCALE_VALUE | TBIGINT_SHIFT_SCALE_VALUE | TDISTANCE_TFLOAT_FLOAT | TDISTANCE_TINT_INT | TDISTANCE_TNUMBER_TNUMBER | TEMPORAL_ROUND | EVER_EQ_TBIGINT_BIGINT | EVER_NE_TBIGINT_BIGINT | EVER_LT_TBIGINT_BIGINT | EVER_LE_TBIGINT_BIGINT | EVER_GT_TBIGINT_BIGINT | EVER_GE_TBIGINT_BIGINT | ALWAYS_EQ_TBIGINT_BIGINT | ALWAYS_NE_TBIGINT_BIGINT | ALWAYS_LT_TBIGINT_BIGINT | ALWAYS_LE_TBIGINT_BIGINT | ALWAYS_GT_TBIGINT_BIGINT | ALWAYS_GE_TBIGINT_BIGINT | EVER_EQ_BIGINT_TBIGINT | EVER_NE_BIGINT_TBIGINT | EVER_LT_BIGINT_TBIGINT | EVER_LE_BIGINT_TBIGINT | EVER_GT_BIGINT_TBIGINT | EVER_GE_BIGINT_TBIGINT | ALWAYS_EQ_BIGINT_TBIGINT | ALWAYS_NE_BIGINT_TBIGINT | ALWAYS_LT_BIGINT_TBIGINT | ALWAYS_LE_BIGINT_TBIGINT | ALWAYS_GT_BIGINT_TBIGINT | ALWAYS_GE_BIGINT_TBIGINT | EVER_EQ_TBOOL_BOOL | EVER_NE_TBOOL_BOOL | ALWAYS_EQ_TBOOL_BOOL | ALWAYS_NE_TBOOL_BOOL | EVER_EQ_BOOL_TBOOL | EVER_NE_BOOL_TBOOL | ALWAYS_EQ_BOOL_TBOOL | ALWAYS_NE_BOOL_TBOOL | TBIGINT_TO_TINT | TBIGINT_TO_TFLOAT | TINT_TO_TBIGINT | TFLOAT_TO_TBIGINT | TBOOL_TO_TINT | TNOT_TBOOL | TAND_TBOOL_BOOL | TOR_TBOOL_BOOL | TEQ_TBOOL_BOOL | TNE_TBOOL_BOOL | TAND_BOOL_TBOOL | TOR_BOOL_TBOOL | TEQ_BOOL_TBOOL | TNE_BOOL_TBOOL | TAND_TBOOL_TBOOL | TOR_TBOOL_TBOOL | ECOVERS_TGEO_GEO | EDISJOINT_TGEO_GEO | NAD_TGEO_TGEO | ECONTAINS_TCBUFFER_TCBUFFER | ACONTAINS_TCBUFFER_TCBUFFER | EDISJOINT_TCBUFFER_TCBUFFER | EDWITHIN_TCBUFFER_CBUFFER | ADWITHIN_TCBUFFER_CBUFFER | ACONTAINS_TGEO_GEO | ACOVERS_TGEO_GEO | ADISJOINT_TGEO_GEO | AINTERSECTS_TGEO_GEO | ATOUCHES_TGEO_GEO | ECONTAINS_TGEO_GEO | ECOVERS_TGEO_GEO | EDISJOINT_TGEO_GEO | EINTERSECTS_TGEO_GEO | ETOUCHES_TGEO_GEO | EVER_EQ_TGEO_GEO | EVER_NE_TGEO_GEO | ALWAYS_EQ_TGEO_GEO | ALWAYS_NE_TGEO_GEO | NAD_TGEO_GEO | ADWITHIN_TGEO_GEO | ACONTAINS_TGEO_TGEO | ACOVERS_TGEO_TGEO | ADISJOINT_TGEO_TGEO | AINTERSECTS_TGEO_TGEO | ATOUCHES_TGEO_TGEO | ECONTAINS_TGEO_TGEO | ECOVERS_TGEO_TGEO | EDISJOINT_TGEO_TGEO | EINTERSECTS_TGEO_TGEO | ETOUCHES_TGEO_TGEO | EVER_EQ_TGEO_TGEO | EVER_NE_TGEO_TGEO | ALWAYS_EQ_TGEO_TGEO | ALWAYS_NE_TGEO_TGEO | NAD_TGEO_TGEO | EDWITHIN_TGEO_TGEO | ADWITHIN_TGEO_TGEO | ACONTAINS_TCBUFFER_GEO | ACOVERS_TCBUFFER_GEO | ADISJOINT_TCBUFFER_GEO | AINTERSECTS_TCBUFFER_GEO | ATOUCHES_TCBUFFER_GEO | ECONTAINS_TCBUFFER_GEO | ECOVERS_TCBUFFER_GEO | EDISJOINT_TCBUFFER_GEO | EINTERSECTS_TCBUFFER_GEO | ETOUCHES_TCBUFFER_GEO | NAD_TCBUFFER_GEO | EDWITHIN_TCBUFFER_GEO | ADWITHIN_TCBUFFER_GEO | ACONTAINS_TCBUFFER_TCBUFFER | ACOVERS_TCBUFFER_TCBUFFER | ADISJOINT_TCBUFFER_TCBUFFER | AINTERSECTS_TCBUFFER_TCBUFFER | ATOUCHES_TCBUFFER_TCBUFFER | ECONTAINS_TCBUFFER_TCBUFFER | ECOVERS_TCBUFFER_TCBUFFER | EDISJOINT_TCBUFFER_TCBUFFER | EINTERSECTS_TCBUFFER_TCBUFFER | ETOUCHES_TCBUFFER_TCBUFFER | EVER_EQ_TCBUFFER_TCBUFFER | EVER_NE_TCBUFFER_TCBUFFER | ALWAYS_EQ_TCBUFFER_TCBUFFER | ALWAYS_NE_TCBUFFER_TCBUFFER | NAD_TCBUFFER_TCBUFFER | EDWITHIN_TCBUFFER_TCBUFFER | ADWITHIN_TCBUFFER_TCBUFFER | MINDISTANCE_TCBUFFER_TCBUFFER | H3INDEX_EQ | H3INDEX_NE | H3INDEX_LT | H3INDEX_LE | H3INDEX_GT | H3INDEX_GE | H3INDEX_CMP | H3INDEX_OUT | TH3INDEX_GET_RESOLUTION | TH3INDEX_GET_BASE_CELL_NUMBER | TH3INDEX_IS_VALID_CELL | TH3INDEX_IS_PENTAGON | TH3INDEX_CELL_TO_PARENT | TH3INDEX_CELL_TO_PARENT_NEXT | TH3INDEX_CELL_TO_CENTER_CHILD | TH3INDEX_CELL_TO_CENTER_CHILD_NEXT | TH3INDEX_CELL_TO_CHILD_POS | TH3INDEX_ARE_NEIGHBOR_CELLS | TH3INDEX_GRID_DISTANCE | EVEREQTH3INDEXH3INDEX | EVERNETH3INDEXH3INDEX | ALWAYSEQTH3INDEXH3INDEX | ALWAYSNETH3INDEXH3INDEX | QUADBIN_EQ | QUADBIN_NE | QUADBIN_LT | QUADBIN_LE | QUADBIN_GT | QUADBIN_GE | QUADBIN_CMP | QUADBIN_GET_RESOLUTION | QUADBIN_IS_VALID_CELL | QUADBIN_CELL_AREA | QUADBIN_CELL_TO_PARENT | QUADBIN_CELL_TO_QUADKEY | QUADBIN_POINT_TO_CELL | QUADBIN_TILE_TO_CELL | EVEREQTQUADBINQUADBIN | EVERNETQUADBINQUADBIN | ALWAYSEQTQUADBINQUADBIN | ALWAYSNETQUADBINQUADBIN | EVEREQTTEXTTEXT | EVEREQTEXTTTEXT | EVERNETTEXTTEXT | EVERNETEXTTTEXT | EVERGETTEXTTEXT | EVERGETEXTTTEXT | EVERGTTTEXTTEXT | EVERGTTEXTTTEXT | EVERLETTEXTTEXT | EVERLETEXTTTEXT | EVERLTTTEXTTEXT | EVERLTTEXTTTEXT | ALWAYSEQTTEXTTEXT | ALWAYSEQTEXTTTEXT | ALWAYSNETTEXTTEXT | ALWAYSNETEXTTTEXT | ALWAYSGETTEXTTEXT | ALWAYSGETEXTTTEXT | ALWAYSGTTTEXTTEXT | ALWAYSGTTEXTTTEXT | ALWAYSLETTEXTTEXT | ALWAYSLETEXTTTEXT | ALWAYSLTTTEXTTEXT | ALWAYSLTTEXTTTEXT | TEQ_TTEXT_TEXT | TEQ_TEXT_TTEXT | TNE_TTEXT_TEXT | TNE_TEXT_TTEXT | TTEXT_UPPER | TTEXT_LOWER | TTEXT_INITCAP | TEXT_UPPER | TEXT_LOWER | TEXT_INITCAP | TEXTCAT_TTEXT_TEXT | TEXTCAT_TEXT_TTEXT | TEXTCAT_TTEXT_TTEXT | TGE_TTEXT_TEXT | TGE_TEXT_TTEXT | TGT_TTEXT_TEXT | TGT_TEXT_TTEXT | TLE_TTEXT_TEXT | TLE_TEXT_TTEXT | TLT_TTEXT_TEXT | TLT_TEXT_TTEXT | JSONB_EQ | JSONB_NE | JSONB_LT | JSONB_LE | JSONB_GT | JSONB_GE | JSONB_CMP | JSONB_CONTAINED | JSONB_CONTAINS | JSONB_EXISTS | JSONB_ARRAY_LENGTH | JSONB_TO_CSTRING | JSONB_PRETTY | JSONB_OBJECT_FIELD_TEXT | JSONB_ARRAY_ELEMENT_TEXT | EVEREQTJSONBJSONB | EVERNETJSONBJSONB | ALWAYSEQTJSONBJSONB | ALWAYSNETJSONBJSONB | EVEREQTJSONBTJSONB | EVERNETJSONBTJSONB | ALWAYSEQTJSONBTJSONB | ALWAYSNETJSONBTJSONB | NAD_TNPOINT_GEO | NAD_TNPOINT_NPOINT | NAD_TNPOINT_TNPOINT | EVEREQNPOINTTNPOINT | EVEREQTNPOINTNPOINT | EVEREQTNPOINTTNPOINT | EVERNENPOINTTNPOINT | EVERNETNPOINTNPOINT | EVERNETNPOINTTNPOINT | ALWAYSEQNPOINTTNPOINT | ALWAYSEQTNPOINTNPOINT | ALWAYSEQTNPOINTTNPOINT | ALWAYSNENPOINTTNPOINT | ALWAYSNETNPOINTNPOINT | ALWAYSNETNPOINTTNPOINT | NAD_TPOSE_POSE | NAD_TPOSE_TPOSE | NAD_TPOSE_GEO | EVEREQPOSETPOSE | EVEREQTPOSEPOSE | EVEREQTPOSETPOSE | EVERNEPOSETPOSE | EVERNETPOSEPOSE | EVERNETPOSETPOSE | ALWAYSEQPOSETPOSE | ALWAYSEQTPOSEPOSE | ALWAYSEQTPOSETPOSE | ALWAYSNEPOSETPOSE | ALWAYSNETPOSEPOSE | ALWAYSNETPOSETPOSE | GEOMBOUNDARY | GEOMCENTROID | GEOMCONVEXHULL | GEOREVERSE | GEOPOINTS | GEOMUNARYUNION | GEO_SET_SRID | GEO_ROUND | GEO_TRANSFORM | GEOSRID | GEONUMGEOS | GEONUMPOINTS | GEOMLENGTH | GEOMPERIMETER | GEOMISEMPTY | GEOMAZIMUTH | GEOISUNITARY | GEOEQUALS | GEOSAME | GEOMINTERSECTS | GEOMINTERSECTS2D | GEOMINTERSECTS3D | GEOMCONTAINS | GEOMCOVERS | GEOMDISJOINT2D | GEOMTOUCHES | GEOGINTERSECTS | GEOGDISTANCE | LINELOCATEPOINT | GEOMDISTANCE2D | GEOMDISTANCE3D | GEOMDWITHIN2D | GEOMDWITHIN3D | GEOGDWITHIN | GEOMDWITHIN | GEOMINTERSECTION2D | GEOMINTERSECTION2DCOLL | GEOMDIFFERENCE2D | GEOMSHORTESTLINE2D | GEOMSHORTESTLINE3D | LINE_INTERPOLATE_POINT | LINE_SUBSTRING | LINE_NUMPOINTS | LINE_POINT_N | GEO_GEO_N | GEO_AS_EWKT | GEO_AS_GEOJSON | GEOM_POINT_MAKE2D | GEOM_POINT_MAKE3DZ | GEOG_POINT_MAKE2D | GEOG_POINT_MAKE3DZ | GEOGAREA | GEOGLENGTH | GEOGPERIMETER | GEOGTOGEOM | GEOMTOGEOG | GEOG_CENTROID | INTSPANLOWER | INTSPANUPPER | INTSPANWIDTH | INTSPANLOWERINC | INTSPANUPPERINC | FLOATSPANLOWER | FLOATSPANUPPER | FLOATSPANWIDTH | FLOATSPANLOWERINC | FLOATSPANUPPERINC | CONTAINED_INT_SPAN | CONTAINED_FLOAT_SPAN | CONTAINED_SPAN_SPAN | CONTAINED_FLOATSPAN_SPAN | CONTAINS_SPAN_INT | CONTAINS_SPAN_FLOAT | CONTAINS_SPAN_SPAN | CONTAINS_FLOATSPAN_SPAN | ACONTAINS_GEO_TRGEOMETRY | ACOVERS_GEO_TRGEOMETRY | ACOVERS_TRGEOMETRY_GEO | ADISJOINT_TRGEOMETRY_GEO | ADISJOINT_TRGEOMETRY_TRGEOMETRY | ADWITHIN_TRGEOMETRY_GEO | ADWITHIN_TRGEOMETRY_TRGEOMETRY | AINTERSECTS_TRGEOMETRY_GEO | AINTERSECTS_TRGEOMETRY_TRGEOMETRY | ALWAYS_EQ_GEO_TRGEOMETRY | ALWAYS_EQ_TRGEOMETRY_GEO | ALWAYS_EQ_TRGEOMETRY_TRGEOMETRY | ALWAYS_NE_GEO_TRGEOMETRY | ALWAYS_NE_TRGEOMETRY_GEO | ALWAYS_NE_TRGEOMETRY_TRGEOMETRY | ATOUCHES_TRGEOMETRY_GEO | ECONTAINS_GEO_TRGEOMETRY | ECOVERS_GEO_TRGEOMETRY | ECOVERS_TRGEOMETRY_GEO | EDISJOINT_TRGEOMETRY_GEO | EDISJOINT_TRGEOMETRY_TRGEOMETRY | EDWITHIN_TRGEOMETRY_GEO | EDWITHIN_TRGEOMETRY_TRGEOMETRY | EINTERSECTS_TRGEOMETRY_GEO | EINTERSECTS_TRGEOMETRY_TRGEOMETRY | ETOUCHES_TRGEOMETRY_GEO | EVER_EQ_GEO_TRGEOMETRY | EVER_EQ_TRGEOMETRY_GEO | EVER_EQ_TRGEOMETRY_TRGEOMETRY | EVER_NE_GEO_TRGEOMETRY | EVER_NE_TRGEOMETRY_GEO | EVER_NE_TRGEOMETRY_TRGEOMETRY | NAD_TRGEOMETRY_GEO | NAD_TRGEOMETRY_TRGEOMETRY | TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY | TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY | TEMPORAL_ECOVERS_TPOSE_GEOMETRY | TEMPORAL_EDISJOINT_TPOSE_GEOMETRY | TEMPORAL_ADISJOINT_TPOSE_GEOMETRY | TEMPORAL_ETOUCHES_TPOSE_GEOMETRY | TEMPORAL_ATOUCHES_TPOSE_GEOMETRY | TEMPORAL_ECONTAINS_TPOSE_GEOMETRY | TEMPORAL_ACONTAINS_TPOSE_GEOMETRY | TEMPORAL_EDWITHIN_TPOSE_GEOMETRY | TEMPORAL_ADWITHIN_TPOSE_GEOMETRY | TEMPORAL_EINTERSECTS_TPOSE_TPOSE | TEMPORAL_AINTERSECTS_TPOSE_TPOSE | TEMPORAL_ECOVERS_TPOSE_TPOSE | TEMPORAL_EDISJOINT_TPOSE_TPOSE | TEMPORAL_ADISJOINT_TPOSE_TPOSE | TEMPORAL_ETOUCHES_TPOSE_TPOSE | TEMPORAL_ATOUCHES_TPOSE_TPOSE | TEMPORAL_ECONTAINS_TPOSE_TPOSE | TEMPORAL_ACONTAINS_TPOSE_TPOSE | TEMPORAL_EDWITHIN_TPOSE_TPOSE | TEMPORAL_ADWITHIN_TPOSE_TPOSE | TEMPORAL_NAD_TPOSE_GEOMETRY | TEMPORAL_NAD_TPOSE_TPOSE | TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY | TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY | TEMPORAL_ECOVERS_TNPOINT_GEOMETRY | TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY | TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY | TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY | TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY | TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY | TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY | TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY | TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY | TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT | TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT | TEMPORAL_ECOVERS_TNPOINT_TNPOINT | TEMPORAL_EDISJOINT_TNPOINT_TNPOINT | TEMPORAL_ADISJOINT_TNPOINT_TNPOINT | TEMPORAL_ETOUCHES_TNPOINT_TNPOINT | TEMPORAL_ATOUCHES_TNPOINT_TNPOINT | TEMPORAL_ECONTAINS_TNPOINT_TNPOINT | TEMPORAL_ACONTAINS_TNPOINT_TNPOINT | TEMPORAL_EDWITHIN_TNPOINT_TNPOINT | TEMPORAL_ADWITHIN_TNPOINT_TNPOINT | TEMPORAL_NAD_TNPOINT_GEOMETRY | TEMPORAL_NAD_TNPOINT_TNPOINT | ABOVESTBOXSTBOX | ADJACENTSTBOXSTBOX | AFTERSTBOXSTBOX | BACKSTBOXSTBOX | BEFORESTBOXSTBOX | BELOWSTBOXSTBOX | CONTAINEDSTBOXSTBOX | CONTAINSSTBOXSTBOX | FRONTSTBOXSTBOX | LEFTSTBOXSTBOX | OVERABOVESTBOXSTBOX | OVERAFTERSTBOXSTBOX | OVERBACKSTBOXSTBOX | OVERBEFORESTBOXSTBOX | OVERBELOWSTBOXSTBOX | OVERFRONTSTBOXSTBOX | OVERLAPSSTBOXSTBOX | OVERLEFTSTBOXSTBOX | OVERRIGHTSTBOXSTBOX | RIGHTSTBOXSTBOX | SAMESTBOXSTBOX | STBOXEQ | STBOXGE | STBOXGT | STBOXLE | STBOXLT | STBOXNE | NAD_STBOX_STBOX | STBOX_CMP | ABOVESTBOXTSPATIAL | ADJACENTSTBOXTSPATIAL | AFTERSTBOXTSPATIAL | BACKSTBOXTSPATIAL | BEFORESTBOXTSPATIAL | BELOWSTBOXTSPATIAL | CONTAINEDSTBOXTSPATIAL | CONTAINSSTBOXTSPATIAL | FRONTSTBOXTSPATIAL | LEFTSTBOXTSPATIAL | OVERABOVESTBOXTSPATIAL | OVERAFTERSTBOXTSPATIAL | OVERBACKSTBOXTSPATIAL | OVERBEFORESTBOXTSPATIAL | OVERBELOWSTBOXTSPATIAL | OVERFRONTSTBOXTSPATIAL | OVERLAPSSTBOXTSPATIAL | OVERLEFTSTBOXTSPATIAL | OVERRIGHTSTBOXTSPATIAL | RIGHTSTBOXTSPATIAL | SAMESTBOXTSPATIAL | ABOVETSPATIALSTBOX | ADJACENTTSPATIALSTBOX | AFTERTSPATIALSTBOX | BACKTSPATIALSTBOX | BEFORETSPATIALSTBOX | BELOWTSPATIALSTBOX | CONTAINEDTSPATIALSTBOX | CONTAINSTSPATIALSTBOX | FRONTTSPATIALSTBOX | LEFTTSPATIALSTBOX | OVERABOVETSPATIALSTBOX | OVERAFTERTSPATIALSTBOX | OVERBACKTSPATIALSTBOX | OVERBEFORETSPATIALSTBOX | OVERBELOWTSPATIALSTBOX | OVERFRONTTSPATIALSTBOX | OVERLAPSTSPATIALSTBOX | OVERLEFTTSPATIALSTBOX | OVERRIGHTTSPATIALSTBOX | RIGHTTSPATIALSTBOX | SAMETSPATIALSTBOX | NAD_TGEO_STBOX | ADJACENTTBOXTNUMBER | AFTERTBOXTNUMBER | BEFORETBOXTNUMBER | CONTAINEDTBOXTNUMBER | CONTAINSTBOXTNUMBER | LEFTTBOXTNUMBER | OVERAFTERTBOXTNUMBER | OVERBEFORETBOXTNUMBER | OVERLAPSTBOXTNUMBER | OVERLEFTTBOXTNUMBER | OVERRIGHTTBOXTNUMBER | RIGHTTBOXTNUMBER | SAMETBOXTNUMBER | ADJACENTTNUMBERTBOX | AFTERTNUMBERTBOX | BEFORETNUMBERTBOX | CONTAINEDTNUMBERTBOX | CONTAINSTNUMBERTBOX | LEFTTNUMBERTBOX | OVERAFTERTNUMBERTBOX | OVERBEFORETNUMBERTBOX | OVERLAPSTNUMBERTBOX | OVERLEFTTNUMBERTBOX | OVERRIGHTTNUMBERTBOX | RIGHTTNUMBERTBOX | SAMETNUMBERTBOX | NAD_TFLOAT_TBOX | NAD_TINT_TBOX | ADJACENTTNUMBERTNUMBER | AFTERTNUMBERTNUMBER | BEFORETNUMBERTNUMBER | CONTAINEDTNUMBERTNUMBER | CONTAINSTNUMBERTNUMBER | LEFTTNUMBERTNUMBER | OVERAFTERTNUMBERTNUMBER | OVERBEFORETNUMBERTNUMBER | OVERLAPSTNUMBERTNUMBER | OVERLEFTTNUMBERTNUMBER | OVERRIGHTTNUMBERTNUMBER | RIGHTTNUMBERTNUMBER | SAMETNUMBERTNUMBER | TBOOL_END_VALUE | TBOOL_START_VALUE | ABOVETSPATIALTSPATIAL | ADJACENTTSPATIALTSPATIAL | AFTERTSPATIALTSPATIAL | BACKTSPATIALTSPATIAL | BEFORETSPATIALTSPATIAL | BELOWTSPATIALTSPATIAL | CONTAINEDTSPATIALTSPATIAL | CONTAINSTSPATIALTSPATIAL | FRONTTSPATIALTSPATIAL | LEFTTSPATIALTSPATIAL | OVERABOVETSPATIALTSPATIAL | OVERAFTERTSPATIALTSPATIAL | OVERBACKTSPATIALTSPATIAL | OVERBEFORETSPATIALTSPATIAL | OVERBELOWTSPATIALTSPATIAL | OVERFRONTTSPATIALTSPATIAL | OVERLAPSTSPATIALTSPATIAL | OVERLEFTTSPATIALTSPATIAL | OVERRIGHTTSPATIALTSPATIAL | RIGHTTSPATIALTSPATIAL | SAMETSPATIALTSPATIAL | ADJACENTTEMPORALTEMPORAL | AFTERTEMPORALTEMPORAL | BEFORETEMPORALTEMPORAL | CONTAINEDTEMPORALTEMPORAL | CONTAINSTEMPORALTEMPORAL | OVERAFTERTEMPORALTEMPORAL | OVERBEFORETEMPORALTEMPORAL | OVERLAPSTEMPORALTEMPORAL | SAMETEMPORALTEMPORAL | TEMPORALCMP | TEMPORALEQ | TEMPORALGE | TEMPORALGT | TEMPORALLE | TEMPORALLT | TEMPORALNE | ALWAYSEQTEMPORALTEMPORAL | ALWAYSGETEMPORALTEMPORAL | ALWAYSGTTEMPORALTEMPORAL | ALWAYSLETEMPORALTEMPORAL | ALWAYSLTTEMPORALTEMPORAL | ALWAYSNETEMPORALTEMPORAL | EVEREQTEMPORALTEMPORAL | EVERGETEMPORALTEMPORAL | EVERGTTEMPORALTEMPORAL | EVERLETEMPORALTEMPORAL | EVERLTTEMPORALTEMPORAL | EVERNETEMPORALTEMPORAL | TEMPORALFRECHETDISTANCE | TEMPORALHAUSDORFFDISTANCE | TEMPORALDYNTIMEWARPDISTANCE | TEMPORALNADTGEOMETRY | TEMPORAL_NAD_TFLOAT | TEMPORAL_NAD_TINT | ALWAYSEQTFLOATFLOAT | ALWAYSGETFLOATFLOAT | ALWAYSGTTFLOATFLOAT | ALWAYSLETFLOATFLOAT | ALWAYSLTTFLOATFLOAT | ALWAYSNETFLOATFLOAT | EVEREQTFLOATFLOAT | EVERGETFLOATFLOAT | EVERGTTFLOATFLOAT | EVERLETFLOATFLOAT | EVERLTTFLOATFLOAT | EVERNETFLOATFLOAT | ALWAYSEQTINTINT | ALWAYSGETINTINT | ALWAYSGTTINTINT | ALWAYSLETINTINT | ALWAYSLTTINTINT | ALWAYSNETINTINT | EVEREQTINTINT | EVERGETINTINT | EVERGTTINTINT | EVERLETINTINT | EVERLTTINTINT | EVERNETINTINT | TEMPORAL_NAD_FLOAT_SCALAR | TEMPORAL_NAD_INT_SCALAR | ALWAYSEQFLOATTFLOAT | ALWAYSGEFLOATTFLOAT | ALWAYSGTFLOATTFLOAT | ALWAYSLEFLOATTFLOAT | ALWAYSLTFLOATTFLOAT | ALWAYSNEFLOATTFLOAT | EVEREQFLOATTFLOAT | EVERGEFLOATTFLOAT | EVERGTFLOATTFLOAT | EVERLEFLOATTFLOAT | EVERLTFLOATTFLOAT | EVERNEFLOATTFLOAT | ALWAYSEQINTTINT | ALWAYSGEINTTINT | ALWAYSGTINTTINT | ALWAYSLEINTTINT | ALWAYSLTINTTINT | ALWAYSNEINTTINT | EVEREQINTTINT | EVERGEINTTINT | EVERGTINTTINT | EVERLEINTTINT | EVERLTINTTINT | EVERNEINTTINT | MULTTNUMBERTNUMBER | TCONTAINSTGEOTGEO | TCOVERSTGEOTGEO | TDISTANCETGEOTGEO | TCONTAINSTCBUFFERTCBUFFER | TCOVERSTCBUFFERTCBUFFER | TDISTANCETCBUFFERTCBUFFER | TDISTANCETNPOINTTNPOINT | TDISTANCETPOSETPOSE | TPOINT_LENGTH_WKB | TNPOINT_LENGTH | TCBUFFER_TO_TFLOAT | NAD_TCBUFFER_STBOX | NAD_TNPOINT_STBOX | NAD_TPOSE_STBOX | ATOUCHESTPOINTGEO | ETOUCHESTPOINTGEO | TEMPORALACONTAINSGEOMETRY | TEMPORALADISJOINTGEOMETRY | TEMPORALAINTERSECTSGEOMETRY | TEMPORALATOUCHESGEOMETRY | TEMPORALECONTAINSGEOMETRY | TEMPORALECOVERSGEOMETRY | TEMPORALEDISJOINTGEOMETRY | TEMPORALEINTERSECTSGEOMETRY | TEMPORALETOUCHESGEOMETRY | TEMPORALINTERSECTSGEOMETRY | TEMPORALATGEOMETRY | TEMPORALMINUSGEOMETRY | TEMPORALADWITHINGEOMETRY | TEMPORALEDWITHINGEOMETRY | TEMPORALADWITHINTGEOMETRY | TEMPORALEDWITHINTGEOMETRY | TEMPORALACONTAINSTGEOMETRY | TEMPORALADISJOINTTGEOMETRY | TEMPORALAINTERSECTSTGEOMETRY | TEMPORALATOUCHESTGEOMETRY | TEMPORALECONTAINSTGEOMETRY | TEMPORALECOVERSTGEOMETRY | TEMPORALEDISJOINTTGEOMETRY | TEMPORALEINTERSECTSTGEOMETRY | TEMPORALETOUCHESTGEOMETRY | TEMPORAL_NAD_GEOMETRY | TEMPORALACONTAINSTCBUFFER | TEMPORALACOVERSTCBUFFER | TEMPORALADISJOINTTCBUFFER | TEMPORALAINTERSECTSTCBUFFER | TEMPORALATOUCHESTCBUFFER | TEMPORALECONTAINSTCBUFFER | TEMPORALECOVERSTCBUFFER | TEMPORALEDISJOINTTCBUFFER | TEMPORALEINTERSECTSTCBUFFER | TEMPORALETOUCHESTCBUFFER | TEMPORAL_NAD_TCBUFFER | TEMPORALADWITHINTCBUFFERGEOMETRY | TEMPORALEDWITHINTCBUFFERGEOMETRY | ALWAYSEQTCBUFFERCBUFFER | ALWAYSNETCBUFFERCBUFFER | EVEREQTCBUFFERCBUFFER | EVERNETCBUFFERCBUFFER | TEMPORALACONTAINSTCBUFFERCBUFFER | TEMPORALACOVERSTCBUFFERCBUFFER | TEMPORALADISJOINTTCBUFFERCBUFFER | TEMPORALAINTERSECTSTCBUFFERCBUFFER | TEMPORALATOUCHESTCBUFFERCBUFFER | TEMPORALECONTAINSTCBUFFERCBUFFER | TEMPORALECOVERSTCBUFFERCBUFFER | TEMPORALEDISJOINTTCBUFFERCBUFFER | TEMPORALEINTERSECTSTCBUFFERCBUFFER | TEMPORALETOUCHESTCBUFFERCBUFFER | TEMPORAL_NAD_TCBUFFER_CBUFFER | TEMPORALADWITHINTCBUFFERCBUFFER | TEMPORALEDWITHINTCBUFFERCBUFFER | TEMPORALADISJOINTTCBUFFERTCBUFFER | TEMPORALAINTERSECTSTCBUFFERTCBUFFER | TEMPORALATOUCHESTCBUFFERTCBUFFER | TEMPORALECOVERSTCBUFFERTCBUFFER | TEMPORAL_NAD_TCBUFFER_TCBUFFER | TEMPORALADWITHINTCBUFFERTCBUFFER | TEMPORALEDWITHINTCBUFFERTCBUFFER | TEMPORAL_AT_STBOX | TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER | TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER; sinkClause: INTO sink (',' sink)*; @@ -488,6 +488,776 @@ TEMPORAL_AINTERSECTS_GEOMETRY: 'TEMPORAL_AINTERSECTS_GEOMETRY' | 'temporal_ainte TEMPORAL_ECONTAINS_GEOMETRY: 'TEMPORAL_ECONTAINS_GEOMETRY' | 'temporal_econtains_geometry'; EDWITHIN_TGEO_GEO: 'EDWITHIN_TGEO_GEO' | 'edwithin_tgeo_geo'; TGEO_AT_STBOX: 'TGEO_AT_STBOX' | 'tgeo_at_stbox'; +/* BEGIN CODEGEN LEXER TOKENS */ +TFLOAT_CEIL: 'TFLOAT_CEIL' | 'tfloat_ceil'; +TFLOAT_EXP: 'TFLOAT_EXP' | 'tfloat_exp'; +TFLOAT_FLOOR: 'TFLOAT_FLOOR' | 'tfloat_floor'; +TFLOAT_LN: 'TFLOAT_LN' | 'tfloat_ln'; +TFLOAT_LOG10: 'TFLOAT_LOG10' | 'tfloat_log10'; +TFLOAT_RADIANS: 'TFLOAT_RADIANS' | 'tfloat_radians'; +TFLOAT_TO_TINT: 'TFLOAT_TO_TINT' | 'tfloat_to_tint'; +TINT_TO_TFLOAT: 'TINT_TO_TFLOAT' | 'tint_to_tfloat'; +ADD_TFLOAT_FLOAT: 'ADD_TFLOAT_FLOAT' | 'add_tfloat_float'; +SUB_TFLOAT_FLOAT: 'SUB_TFLOAT_FLOAT' | 'sub_tfloat_float'; +MUL_TFLOAT_FLOAT: 'MUL_TFLOAT_FLOAT' | 'mul_tfloat_float'; +DIV_TFLOAT_FLOAT: 'DIV_TFLOAT_FLOAT' | 'div_tfloat_float'; +ADD_TINT_INT: 'ADD_TINT_INT' | 'add_tint_int'; +SUB_TINT_INT: 'SUB_TINT_INT' | 'sub_tint_int'; +MUL_TINT_INT: 'MUL_TINT_INT' | 'mul_tint_int'; +DIV_TINT_INT: 'DIV_TINT_INT' | 'div_tint_int'; +ADD_FLOAT_TFLOAT: 'ADD_FLOAT_TFLOAT' | 'add_float_tfloat'; +SUB_FLOAT_TFLOAT: 'SUB_FLOAT_TFLOAT' | 'sub_float_tfloat'; +MUL_FLOAT_TFLOAT: 'MUL_FLOAT_TFLOAT' | 'mul_float_tfloat'; +DIV_FLOAT_TFLOAT: 'DIV_FLOAT_TFLOAT' | 'div_float_tfloat'; +ADD_INT_TINT: 'ADD_INT_TINT' | 'add_int_tint'; +SUB_INT_TINT: 'SUB_INT_TINT' | 'sub_int_tint'; +MUL_INT_TINT: 'MUL_INT_TINT' | 'mul_int_tint'; +DIV_INT_TINT: 'DIV_INT_TINT' | 'div_int_tint'; +ADD_TBIGINT_BIGINT: 'ADD_TBIGINT_BIGINT' | 'add_tbigint_bigint'; +SUB_TBIGINT_BIGINT: 'SUB_TBIGINT_BIGINT' | 'sub_tbigint_bigint'; +MUL_TBIGINT_BIGINT: 'MUL_TBIGINT_BIGINT' | 'mul_tbigint_bigint'; +DIV_TBIGINT_BIGINT: 'DIV_TBIGINT_BIGINT' | 'div_tbigint_bigint'; +ADD_BIGINT_TBIGINT: 'ADD_BIGINT_TBIGINT' | 'add_bigint_tbigint'; +SUB_BIGINT_TBIGINT: 'SUB_BIGINT_TBIGINT' | 'sub_bigint_tbigint'; +MUL_BIGINT_TBIGINT: 'MUL_BIGINT_TBIGINT' | 'mul_bigint_tbigint'; +DIV_BIGINT_TBIGINT: 'DIV_BIGINT_TBIGINT' | 'div_bigint_tbigint'; +ADD_TNUMBER_TNUMBER: 'ADD_TNUMBER_TNUMBER' | 'add_tnumber_tnumber'; +SUB_TNUMBER_TNUMBER: 'SUB_TNUMBER_TNUMBER' | 'sub_tnumber_tnumber'; +MUL_TNUMBER_TNUMBER: 'MUL_TNUMBER_TNUMBER' | 'mul_tnumber_tnumber'; +DIV_TNUMBER_TNUMBER: 'DIV_TNUMBER_TNUMBER' | 'div_tnumber_tnumber'; +TFLOAT_SHIFT_VALUE: 'TFLOAT_SHIFT_VALUE' | 'tfloat_shift_value'; +TFLOAT_SCALE_VALUE: 'TFLOAT_SCALE_VALUE' | 'tfloat_scale_value'; +TFLOAT_SHIFT_SCALE_VALUE: 'TFLOAT_SHIFT_SCALE_VALUE' | 'tfloat_shift_scale_value'; +TINT_SHIFT_VALUE: 'TINT_SHIFT_VALUE' | 'tint_shift_value'; +TINT_SCALE_VALUE: 'TINT_SCALE_VALUE' | 'tint_scale_value'; +TINT_SHIFT_SCALE_VALUE: 'TINT_SHIFT_SCALE_VALUE' | 'tint_shift_scale_value'; +TBIGINT_SHIFT_VALUE: 'TBIGINT_SHIFT_VALUE' | 'tbigint_shift_value'; +TBIGINT_SCALE_VALUE: 'TBIGINT_SCALE_VALUE' | 'tbigint_scale_value'; +TBIGINT_SHIFT_SCALE_VALUE: 'TBIGINT_SHIFT_SCALE_VALUE' | 'tbigint_shift_scale_value'; +TDISTANCE_TFLOAT_FLOAT: 'TDISTANCE_TFLOAT_FLOAT' | 'tdistance_tfloat_float'; +TDISTANCE_TINT_INT: 'TDISTANCE_TINT_INT' | 'tdistance_tint_int'; +TDISTANCE_TNUMBER_TNUMBER: 'TDISTANCE_TNUMBER_TNUMBER' | 'tdistance_tnumber_tnumber'; +TEMPORAL_ROUND: 'TEMPORAL_ROUND' | 'temporal_round'; +EVER_EQ_TBIGINT_BIGINT: 'EVER_EQ_TBIGINT_BIGINT' | 'ever_eq_tbigint_bigint'; +EVER_NE_TBIGINT_BIGINT: 'EVER_NE_TBIGINT_BIGINT' | 'ever_ne_tbigint_bigint'; +EVER_LT_TBIGINT_BIGINT: 'EVER_LT_TBIGINT_BIGINT' | 'ever_lt_tbigint_bigint'; +EVER_LE_TBIGINT_BIGINT: 'EVER_LE_TBIGINT_BIGINT' | 'ever_le_tbigint_bigint'; +EVER_GT_TBIGINT_BIGINT: 'EVER_GT_TBIGINT_BIGINT' | 'ever_gt_tbigint_bigint'; +EVER_GE_TBIGINT_BIGINT: 'EVER_GE_TBIGINT_BIGINT' | 'ever_ge_tbigint_bigint'; +ALWAYS_EQ_TBIGINT_BIGINT: 'ALWAYS_EQ_TBIGINT_BIGINT' | 'always_eq_tbigint_bigint'; +ALWAYS_NE_TBIGINT_BIGINT: 'ALWAYS_NE_TBIGINT_BIGINT' | 'always_ne_tbigint_bigint'; +ALWAYS_LT_TBIGINT_BIGINT: 'ALWAYS_LT_TBIGINT_BIGINT' | 'always_lt_tbigint_bigint'; +ALWAYS_LE_TBIGINT_BIGINT: 'ALWAYS_LE_TBIGINT_BIGINT' | 'always_le_tbigint_bigint'; +ALWAYS_GT_TBIGINT_BIGINT: 'ALWAYS_GT_TBIGINT_BIGINT' | 'always_gt_tbigint_bigint'; +ALWAYS_GE_TBIGINT_BIGINT: 'ALWAYS_GE_TBIGINT_BIGINT' | 'always_ge_tbigint_bigint'; +EVER_EQ_BIGINT_TBIGINT: 'EVER_EQ_BIGINT_TBIGINT' | 'ever_eq_bigint_tbigint'; +EVER_NE_BIGINT_TBIGINT: 'EVER_NE_BIGINT_TBIGINT' | 'ever_ne_bigint_tbigint'; +EVER_LT_BIGINT_TBIGINT: 'EVER_LT_BIGINT_TBIGINT' | 'ever_lt_bigint_tbigint'; +EVER_LE_BIGINT_TBIGINT: 'EVER_LE_BIGINT_TBIGINT' | 'ever_le_bigint_tbigint'; +EVER_GT_BIGINT_TBIGINT: 'EVER_GT_BIGINT_TBIGINT' | 'ever_gt_bigint_tbigint'; +EVER_GE_BIGINT_TBIGINT: 'EVER_GE_BIGINT_TBIGINT' | 'ever_ge_bigint_tbigint'; +ALWAYS_EQ_BIGINT_TBIGINT: 'ALWAYS_EQ_BIGINT_TBIGINT' | 'always_eq_bigint_tbigint'; +ALWAYS_NE_BIGINT_TBIGINT: 'ALWAYS_NE_BIGINT_TBIGINT' | 'always_ne_bigint_tbigint'; +ALWAYS_LT_BIGINT_TBIGINT: 'ALWAYS_LT_BIGINT_TBIGINT' | 'always_lt_bigint_tbigint'; +ALWAYS_LE_BIGINT_TBIGINT: 'ALWAYS_LE_BIGINT_TBIGINT' | 'always_le_bigint_tbigint'; +ALWAYS_GT_BIGINT_TBIGINT: 'ALWAYS_GT_BIGINT_TBIGINT' | 'always_gt_bigint_tbigint'; +ALWAYS_GE_BIGINT_TBIGINT: 'ALWAYS_GE_BIGINT_TBIGINT' | 'always_ge_bigint_tbigint'; +EVER_EQ_TBOOL_BOOL: 'EVER_EQ_TBOOL_BOOL' | 'ever_eq_tbool_bool'; +EVER_NE_TBOOL_BOOL: 'EVER_NE_TBOOL_BOOL' | 'ever_ne_tbool_bool'; +ALWAYS_EQ_TBOOL_BOOL: 'ALWAYS_EQ_TBOOL_BOOL' | 'always_eq_tbool_bool'; +ALWAYS_NE_TBOOL_BOOL: 'ALWAYS_NE_TBOOL_BOOL' | 'always_ne_tbool_bool'; +EVER_EQ_BOOL_TBOOL: 'EVER_EQ_BOOL_TBOOL' | 'ever_eq_bool_tbool'; +EVER_NE_BOOL_TBOOL: 'EVER_NE_BOOL_TBOOL' | 'ever_ne_bool_tbool'; +ALWAYS_EQ_BOOL_TBOOL: 'ALWAYS_EQ_BOOL_TBOOL' | 'always_eq_bool_tbool'; +ALWAYS_NE_BOOL_TBOOL: 'ALWAYS_NE_BOOL_TBOOL' | 'always_ne_bool_tbool'; +TBIGINT_TO_TINT: 'TBIGINT_TO_TINT' | 'tbigint_to_tint'; +TBIGINT_TO_TFLOAT: 'TBIGINT_TO_TFLOAT' | 'tbigint_to_tfloat'; +TINT_TO_TBIGINT: 'TINT_TO_TBIGINT' | 'tint_to_tbigint'; +TFLOAT_TO_TBIGINT: 'TFLOAT_TO_TBIGINT' | 'tfloat_to_tbigint'; +TBOOL_TO_TINT: 'TBOOL_TO_TINT' | 'tbool_to_tint'; +TNOT_TBOOL: 'TNOT_TBOOL' | 'tnot_tbool'; +TAND_TBOOL_BOOL: 'TAND_TBOOL_BOOL' | 'tand_tbool_bool'; +TOR_TBOOL_BOOL: 'TOR_TBOOL_BOOL' | 'tor_tbool_bool'; +TEQ_TBOOL_BOOL: 'TEQ_TBOOL_BOOL' | 'teq_tbool_bool'; +TNE_TBOOL_BOOL: 'TNE_TBOOL_BOOL' | 'tne_tbool_bool'; +TAND_BOOL_TBOOL: 'TAND_BOOL_TBOOL' | 'tand_bool_tbool'; +TOR_BOOL_TBOOL: 'TOR_BOOL_TBOOL' | 'tor_bool_tbool'; +TEQ_BOOL_TBOOL: 'TEQ_BOOL_TBOOL' | 'teq_bool_tbool'; +TNE_BOOL_TBOOL: 'TNE_BOOL_TBOOL' | 'tne_bool_tbool'; +TAND_TBOOL_TBOOL: 'TAND_TBOOL_TBOOL' | 'tand_tbool_tbool'; +TOR_TBOOL_TBOOL: 'TOR_TBOOL_TBOOL' | 'tor_tbool_tbool'; +ECOVERS_TGEO_GEO: 'ECOVERS_TGEO_GEO' | 'ecovers_tgeo_geo'; +EDISJOINT_TGEO_GEO: 'EDISJOINT_TGEO_GEO' | 'edisjoint_tgeo_geo'; +NAD_TGEO_TGEO: 'NAD_TGEO_TGEO' | 'nad_tgeo_tgeo'; +ECONTAINS_TCBUFFER_TCBUFFER: 'ECONTAINS_TCBUFFER_TCBUFFER' | 'econtains_tcbuffer_tcbuffer'; +ACONTAINS_TCBUFFER_TCBUFFER: 'ACONTAINS_TCBUFFER_TCBUFFER' | 'acontains_tcbuffer_tcbuffer'; +EDISJOINT_TCBUFFER_TCBUFFER: 'EDISJOINT_TCBUFFER_TCBUFFER' | 'edisjoint_tcbuffer_tcbuffer'; +EDWITHIN_TCBUFFER_CBUFFER: 'EDWITHIN_TCBUFFER_CBUFFER' | 'edwithin_tcbuffer_cbuffer'; +ADWITHIN_TCBUFFER_CBUFFER: 'ADWITHIN_TCBUFFER_CBUFFER' | 'adwithin_tcbuffer_cbuffer'; +ACONTAINS_TGEO_GEO: 'ACONTAINS_TGEO_GEO' | 'acontains_tgeo_geo'; +ACOVERS_TGEO_GEO: 'ACOVERS_TGEO_GEO' | 'acovers_tgeo_geo'; +ADISJOINT_TGEO_GEO: 'ADISJOINT_TGEO_GEO' | 'adisjoint_tgeo_geo'; +AINTERSECTS_TGEO_GEO: 'AINTERSECTS_TGEO_GEO' | 'aintersects_tgeo_geo'; +ATOUCHES_TGEO_GEO: 'ATOUCHES_TGEO_GEO' | 'atouches_tgeo_geo'; +ECONTAINS_TGEO_GEO: 'ECONTAINS_TGEO_GEO' | 'econtains_tgeo_geo'; +ECOVERS_TGEO_GEO: 'ECOVERS_TGEO_GEO' | 'ecovers_tgeo_geo'; +EDISJOINT_TGEO_GEO: 'EDISJOINT_TGEO_GEO' | 'edisjoint_tgeo_geo'; +EINTERSECTS_TGEO_GEO: 'EINTERSECTS_TGEO_GEO' | 'eintersects_tgeo_geo'; +ETOUCHES_TGEO_GEO: 'ETOUCHES_TGEO_GEO' | 'etouches_tgeo_geo'; +EVER_EQ_TGEO_GEO: 'EVER_EQ_TGEO_GEO' | 'ever_eq_tgeo_geo'; +EVER_NE_TGEO_GEO: 'EVER_NE_TGEO_GEO' | 'ever_ne_tgeo_geo'; +ALWAYS_EQ_TGEO_GEO: 'ALWAYS_EQ_TGEO_GEO' | 'always_eq_tgeo_geo'; +ALWAYS_NE_TGEO_GEO: 'ALWAYS_NE_TGEO_GEO' | 'always_ne_tgeo_geo'; +NAD_TGEO_GEO: 'NAD_TGEO_GEO' | 'nad_tgeo_geo'; +ADWITHIN_TGEO_GEO: 'ADWITHIN_TGEO_GEO' | 'adwithin_tgeo_geo'; +ACONTAINS_TGEO_TGEO: 'ACONTAINS_TGEO_TGEO' | 'acontains_tgeo_tgeo'; +ACOVERS_TGEO_TGEO: 'ACOVERS_TGEO_TGEO' | 'acovers_tgeo_tgeo'; +ADISJOINT_TGEO_TGEO: 'ADISJOINT_TGEO_TGEO' | 'adisjoint_tgeo_tgeo'; +AINTERSECTS_TGEO_TGEO: 'AINTERSECTS_TGEO_TGEO' | 'aintersects_tgeo_tgeo'; +ATOUCHES_TGEO_TGEO: 'ATOUCHES_TGEO_TGEO' | 'atouches_tgeo_tgeo'; +ECONTAINS_TGEO_TGEO: 'ECONTAINS_TGEO_TGEO' | 'econtains_tgeo_tgeo'; +ECOVERS_TGEO_TGEO: 'ECOVERS_TGEO_TGEO' | 'ecovers_tgeo_tgeo'; +EDISJOINT_TGEO_TGEO: 'EDISJOINT_TGEO_TGEO' | 'edisjoint_tgeo_tgeo'; +EINTERSECTS_TGEO_TGEO: 'EINTERSECTS_TGEO_TGEO' | 'eintersects_tgeo_tgeo'; +ETOUCHES_TGEO_TGEO: 'ETOUCHES_TGEO_TGEO' | 'etouches_tgeo_tgeo'; +EVER_EQ_TGEO_TGEO: 'EVER_EQ_TGEO_TGEO' | 'ever_eq_tgeo_tgeo'; +EVER_NE_TGEO_TGEO: 'EVER_NE_TGEO_TGEO' | 'ever_ne_tgeo_tgeo'; +ALWAYS_EQ_TGEO_TGEO: 'ALWAYS_EQ_TGEO_TGEO' | 'always_eq_tgeo_tgeo'; +ALWAYS_NE_TGEO_TGEO: 'ALWAYS_NE_TGEO_TGEO' | 'always_ne_tgeo_tgeo'; +NAD_TGEO_TGEO: 'NAD_TGEO_TGEO' | 'nad_tgeo_tgeo'; +EDWITHIN_TGEO_TGEO: 'EDWITHIN_TGEO_TGEO' | 'edwithin_tgeo_tgeo'; +ADWITHIN_TGEO_TGEO: 'ADWITHIN_TGEO_TGEO' | 'adwithin_tgeo_tgeo'; +ACONTAINS_TCBUFFER_GEO: 'ACONTAINS_TCBUFFER_GEO' | 'acontains_tcbuffer_geo'; +ACOVERS_TCBUFFER_GEO: 'ACOVERS_TCBUFFER_GEO' | 'acovers_tcbuffer_geo'; +ADISJOINT_TCBUFFER_GEO: 'ADISJOINT_TCBUFFER_GEO' | 'adisjoint_tcbuffer_geo'; +AINTERSECTS_TCBUFFER_GEO: 'AINTERSECTS_TCBUFFER_GEO' | 'aintersects_tcbuffer_geo'; +ATOUCHES_TCBUFFER_GEO: 'ATOUCHES_TCBUFFER_GEO' | 'atouches_tcbuffer_geo'; +ECONTAINS_TCBUFFER_GEO: 'ECONTAINS_TCBUFFER_GEO' | 'econtains_tcbuffer_geo'; +ECOVERS_TCBUFFER_GEO: 'ECOVERS_TCBUFFER_GEO' | 'ecovers_tcbuffer_geo'; +EDISJOINT_TCBUFFER_GEO: 'EDISJOINT_TCBUFFER_GEO' | 'edisjoint_tcbuffer_geo'; +EINTERSECTS_TCBUFFER_GEO: 'EINTERSECTS_TCBUFFER_GEO' | 'eintersects_tcbuffer_geo'; +ETOUCHES_TCBUFFER_GEO: 'ETOUCHES_TCBUFFER_GEO' | 'etouches_tcbuffer_geo'; +NAD_TCBUFFER_GEO: 'NAD_TCBUFFER_GEO' | 'nad_tcbuffer_geo'; +EDWITHIN_TCBUFFER_GEO: 'EDWITHIN_TCBUFFER_GEO' | 'edwithin_tcbuffer_geo'; +ADWITHIN_TCBUFFER_GEO: 'ADWITHIN_TCBUFFER_GEO' | 'adwithin_tcbuffer_geo'; +ACONTAINS_TCBUFFER_TCBUFFER: 'ACONTAINS_TCBUFFER_TCBUFFER' | 'acontains_tcbuffer_tcbuffer'; +ACOVERS_TCBUFFER_TCBUFFER: 'ACOVERS_TCBUFFER_TCBUFFER' | 'acovers_tcbuffer_tcbuffer'; +ADISJOINT_TCBUFFER_TCBUFFER: 'ADISJOINT_TCBUFFER_TCBUFFER' | 'adisjoint_tcbuffer_tcbuffer'; +AINTERSECTS_TCBUFFER_TCBUFFER: 'AINTERSECTS_TCBUFFER_TCBUFFER' | 'aintersects_tcbuffer_tcbuffer'; +ATOUCHES_TCBUFFER_TCBUFFER: 'ATOUCHES_TCBUFFER_TCBUFFER' | 'atouches_tcbuffer_tcbuffer'; +ECONTAINS_TCBUFFER_TCBUFFER: 'ECONTAINS_TCBUFFER_TCBUFFER' | 'econtains_tcbuffer_tcbuffer'; +ECOVERS_TCBUFFER_TCBUFFER: 'ECOVERS_TCBUFFER_TCBUFFER' | 'ecovers_tcbuffer_tcbuffer'; +EDISJOINT_TCBUFFER_TCBUFFER: 'EDISJOINT_TCBUFFER_TCBUFFER' | 'edisjoint_tcbuffer_tcbuffer'; +EINTERSECTS_TCBUFFER_TCBUFFER: 'EINTERSECTS_TCBUFFER_TCBUFFER' | 'eintersects_tcbuffer_tcbuffer'; +ETOUCHES_TCBUFFER_TCBUFFER: 'ETOUCHES_TCBUFFER_TCBUFFER' | 'etouches_tcbuffer_tcbuffer'; +EVER_EQ_TCBUFFER_TCBUFFER: 'EVER_EQ_TCBUFFER_TCBUFFER' | 'ever_eq_tcbuffer_tcbuffer'; +EVER_NE_TCBUFFER_TCBUFFER: 'EVER_NE_TCBUFFER_TCBUFFER' | 'ever_ne_tcbuffer_tcbuffer'; +ALWAYS_EQ_TCBUFFER_TCBUFFER: 'ALWAYS_EQ_TCBUFFER_TCBUFFER' | 'always_eq_tcbuffer_tcbuffer'; +ALWAYS_NE_TCBUFFER_TCBUFFER: 'ALWAYS_NE_TCBUFFER_TCBUFFER' | 'always_ne_tcbuffer_tcbuffer'; +NAD_TCBUFFER_TCBUFFER: 'NAD_TCBUFFER_TCBUFFER' | 'nad_tcbuffer_tcbuffer'; +EDWITHIN_TCBUFFER_TCBUFFER: 'EDWITHIN_TCBUFFER_TCBUFFER' | 'edwithin_tcbuffer_tcbuffer'; +ADWITHIN_TCBUFFER_TCBUFFER: 'ADWITHIN_TCBUFFER_TCBUFFER' | 'adwithin_tcbuffer_tcbuffer'; +MINDISTANCE_TCBUFFER_TCBUFFER: 'MINDISTANCE_TCBUFFER_TCBUFFER' | 'mindistance_tcbuffer_tcbuffer'; +H3INDEX_EQ: 'H3INDEX_EQ' | 'h3index_eq'; +H3INDEX_NE: 'H3INDEX_NE' | 'h3index_ne'; +H3INDEX_LT: 'H3INDEX_LT' | 'h3index_lt'; +H3INDEX_LE: 'H3INDEX_LE' | 'h3index_le'; +H3INDEX_GT: 'H3INDEX_GT' | 'h3index_gt'; +H3INDEX_GE: 'H3INDEX_GE' | 'h3index_ge'; +H3INDEX_CMP: 'H3INDEX_CMP' | 'h3index_cmp'; +H3INDEX_OUT: 'H3INDEX_OUT' | 'h3index_out'; +TH3INDEX_GET_RESOLUTION: 'TH3INDEX_GET_RESOLUTION' | 'th3index_get_resolution'; +TH3INDEX_GET_BASE_CELL_NUMBER: 'TH3INDEX_GET_BASE_CELL_NUMBER' | 'th3index_get_base_cell_number'; +TH3INDEX_IS_VALID_CELL: 'TH3INDEX_IS_VALID_CELL' | 'th3index_is_valid_cell'; +TH3INDEX_IS_PENTAGON: 'TH3INDEX_IS_PENTAGON' | 'th3index_is_pentagon'; +TH3INDEX_CELL_TO_PARENT: 'TH3INDEX_CELL_TO_PARENT' | 'th3index_cell_to_parent'; +TH3INDEX_CELL_TO_PARENT_NEXT: 'TH3INDEX_CELL_TO_PARENT_NEXT' | 'th3index_cell_to_parent_next'; +TH3INDEX_CELL_TO_CENTER_CHILD: 'TH3INDEX_CELL_TO_CENTER_CHILD' | 'th3index_cell_to_center_child'; +TH3INDEX_CELL_TO_CENTER_CHILD_NEXT: 'TH3INDEX_CELL_TO_CENTER_CHILD_NEXT' | 'th3index_cell_to_center_child_next'; +TH3INDEX_CELL_TO_CHILD_POS: 'TH3INDEX_CELL_TO_CHILD_POS' | 'th3index_cell_to_child_pos'; +TH3INDEX_ARE_NEIGHBOR_CELLS: 'TH3INDEX_ARE_NEIGHBOR_CELLS' | 'th3index_are_neighbor_cells'; +TH3INDEX_GRID_DISTANCE: 'TH3INDEX_GRID_DISTANCE' | 'th3index_grid_distance'; +EVEREQTH3INDEXH3INDEX: 'EVEREQTH3INDEXH3INDEX' | 'evereqth3indexh3index'; +EVERNETH3INDEXH3INDEX: 'EVERNETH3INDEXH3INDEX' | 'everneth3indexh3index'; +ALWAYSEQTH3INDEXH3INDEX: 'ALWAYSEQTH3INDEXH3INDEX' | 'alwayseqth3indexh3index'; +ALWAYSNETH3INDEXH3INDEX: 'ALWAYSNETH3INDEXH3INDEX' | 'alwaysneth3indexh3index'; +QUADBIN_EQ: 'QUADBIN_EQ' | 'quadbin_eq'; +QUADBIN_NE: 'QUADBIN_NE' | 'quadbin_ne'; +QUADBIN_LT: 'QUADBIN_LT' | 'quadbin_lt'; +QUADBIN_LE: 'QUADBIN_LE' | 'quadbin_le'; +QUADBIN_GT: 'QUADBIN_GT' | 'quadbin_gt'; +QUADBIN_GE: 'QUADBIN_GE' | 'quadbin_ge'; +QUADBIN_CMP: 'QUADBIN_CMP' | 'quadbin_cmp'; +QUADBIN_GET_RESOLUTION: 'QUADBIN_GET_RESOLUTION' | 'quadbin_get_resolution'; +QUADBIN_IS_VALID_CELL: 'QUADBIN_IS_VALID_CELL' | 'quadbin_is_valid_cell'; +QUADBIN_CELL_AREA: 'QUADBIN_CELL_AREA' | 'quadbin_cell_area'; +QUADBIN_CELL_TO_PARENT: 'QUADBIN_CELL_TO_PARENT' | 'quadbin_cell_to_parent'; +QUADBIN_CELL_TO_QUADKEY: 'QUADBIN_CELL_TO_QUADKEY' | 'quadbin_cell_to_quadkey'; +QUADBIN_POINT_TO_CELL: 'QUADBIN_POINT_TO_CELL' | 'quadbin_point_to_cell'; +QUADBIN_TILE_TO_CELL: 'QUADBIN_TILE_TO_CELL' | 'quadbin_tile_to_cell'; +EVEREQTQUADBINQUADBIN: 'EVEREQTQUADBINQUADBIN' | 'evereqtquadbinquadbin'; +EVERNETQUADBINQUADBIN: 'EVERNETQUADBINQUADBIN' | 'evernetquadbinquadbin'; +ALWAYSEQTQUADBINQUADBIN: 'ALWAYSEQTQUADBINQUADBIN' | 'alwayseqtquadbinquadbin'; +ALWAYSNETQUADBINQUADBIN: 'ALWAYSNETQUADBINQUADBIN' | 'alwaysnetquadbinquadbin'; +EVEREQTTEXTTEXT: 'EVEREQTTEXTTEXT' | 'evereqttexttext'; +EVEREQTEXTTTEXT: 'EVEREQTEXTTTEXT' | 'evereqtextttext'; +EVERNETTEXTTEXT: 'EVERNETTEXTTEXT' | 'evernettexttext'; +EVERNETEXTTTEXT: 'EVERNETEXTTTEXT' | 'evernetextttext'; +EVERGETTEXTTEXT: 'EVERGETTEXTTEXT' | 'evergettexttext'; +EVERGETEXTTTEXT: 'EVERGETEXTTTEXT' | 'evergetextttext'; +EVERGTTTEXTTEXT: 'EVERGTTTEXTTEXT' | 'evergtttexttext'; +EVERGTTEXTTTEXT: 'EVERGTTEXTTTEXT' | 'evergttextttext'; +EVERLETTEXTTEXT: 'EVERLETTEXTTEXT' | 'everlettexttext'; +EVERLETEXTTTEXT: 'EVERLETEXTTTEXT' | 'everletextttext'; +EVERLTTTEXTTEXT: 'EVERLTTTEXTTEXT' | 'everltttexttext'; +EVERLTTEXTTTEXT: 'EVERLTTEXTTTEXT' | 'everlttextttext'; +ALWAYSEQTTEXTTEXT: 'ALWAYSEQTTEXTTEXT' | 'alwayseqttexttext'; +ALWAYSEQTEXTTTEXT: 'ALWAYSEQTEXTTTEXT' | 'alwayseqtextttext'; +ALWAYSNETTEXTTEXT: 'ALWAYSNETTEXTTEXT' | 'alwaysnettexttext'; +ALWAYSNETEXTTTEXT: 'ALWAYSNETEXTTTEXT' | 'alwaysnetextttext'; +ALWAYSGETTEXTTEXT: 'ALWAYSGETTEXTTEXT' | 'alwaysgettexttext'; +ALWAYSGETEXTTTEXT: 'ALWAYSGETEXTTTEXT' | 'alwaysgetextttext'; +ALWAYSGTTTEXTTEXT: 'ALWAYSGTTTEXTTEXT' | 'alwaysgtttexttext'; +ALWAYSGTTEXTTTEXT: 'ALWAYSGTTEXTTTEXT' | 'alwaysgttextttext'; +ALWAYSLETTEXTTEXT: 'ALWAYSLETTEXTTEXT' | 'alwayslettexttext'; +ALWAYSLETEXTTTEXT: 'ALWAYSLETEXTTTEXT' | 'alwaysletextttext'; +ALWAYSLTTTEXTTEXT: 'ALWAYSLTTTEXTTEXT' | 'alwaysltttexttext'; +ALWAYSLTTEXTTTEXT: 'ALWAYSLTTEXTTTEXT' | 'alwayslttextttext'; +TEQ_TTEXT_TEXT: 'TEQ_TTEXT_TEXT' | 'teq_ttext_text'; +TEQ_TEXT_TTEXT: 'TEQ_TEXT_TTEXT' | 'teq_text_ttext'; +TNE_TTEXT_TEXT: 'TNE_TTEXT_TEXT' | 'tne_ttext_text'; +TNE_TEXT_TTEXT: 'TNE_TEXT_TTEXT' | 'tne_text_ttext'; +TTEXT_UPPER: 'TTEXT_UPPER' | 'ttext_upper'; +TTEXT_LOWER: 'TTEXT_LOWER' | 'ttext_lower'; +TTEXT_INITCAP: 'TTEXT_INITCAP' | 'ttext_initcap'; +TEXT_UPPER: 'TEXT_UPPER' | 'text_upper'; +TEXT_LOWER: 'TEXT_LOWER' | 'text_lower'; +TEXT_INITCAP: 'TEXT_INITCAP' | 'text_initcap'; +TEXTCAT_TTEXT_TEXT: 'TEXTCAT_TTEXT_TEXT' | 'textcat_ttext_text'; +TEXTCAT_TEXT_TTEXT: 'TEXTCAT_TEXT_TTEXT' | 'textcat_text_ttext'; +TEXTCAT_TTEXT_TTEXT: 'TEXTCAT_TTEXT_TTEXT' | 'textcat_ttext_ttext'; +TGE_TTEXT_TEXT: 'TGE_TTEXT_TEXT' | 'tge_ttext_text'; +TGE_TEXT_TTEXT: 'TGE_TEXT_TTEXT' | 'tge_text_ttext'; +TGT_TTEXT_TEXT: 'TGT_TTEXT_TEXT' | 'tgt_ttext_text'; +TGT_TEXT_TTEXT: 'TGT_TEXT_TTEXT' | 'tgt_text_ttext'; +TLE_TTEXT_TEXT: 'TLE_TTEXT_TEXT' | 'tle_ttext_text'; +TLE_TEXT_TTEXT: 'TLE_TEXT_TTEXT' | 'tle_text_ttext'; +TLT_TTEXT_TEXT: 'TLT_TTEXT_TEXT' | 'tlt_ttext_text'; +TLT_TEXT_TTEXT: 'TLT_TEXT_TTEXT' | 'tlt_text_ttext'; +JSONB_EQ: 'JSONB_EQ' | 'jsonb_eq'; +JSONB_NE: 'JSONB_NE' | 'jsonb_ne'; +JSONB_LT: 'JSONB_LT' | 'jsonb_lt'; +JSONB_LE: 'JSONB_LE' | 'jsonb_le'; +JSONB_GT: 'JSONB_GT' | 'jsonb_gt'; +JSONB_GE: 'JSONB_GE' | 'jsonb_ge'; +JSONB_CMP: 'JSONB_CMP' | 'jsonb_cmp'; +JSONB_CONTAINED: 'JSONB_CONTAINED' | 'jsonb_contained'; +JSONB_CONTAINS: 'JSONB_CONTAINS' | 'jsonb_contains'; +JSONB_EXISTS: 'JSONB_EXISTS' | 'jsonb_exists'; +JSONB_ARRAY_LENGTH: 'JSONB_ARRAY_LENGTH' | 'jsonb_array_length'; +JSONB_TO_CSTRING: 'JSONB_TO_CSTRING' | 'jsonb_to_cstring'; +JSONB_PRETTY: 'JSONB_PRETTY' | 'jsonb_pretty'; +JSONB_OBJECT_FIELD_TEXT: 'JSONB_OBJECT_FIELD_TEXT' | 'jsonb_object_field_text'; +JSONB_ARRAY_ELEMENT_TEXT: 'JSONB_ARRAY_ELEMENT_TEXT' | 'jsonb_array_element_text'; +EVEREQTJSONBJSONB: 'EVEREQTJSONBJSONB' | 'evereqtjsonbjsonb'; +EVERNETJSONBJSONB: 'EVERNETJSONBJSONB' | 'evernetjsonbjsonb'; +ALWAYSEQTJSONBJSONB: 'ALWAYSEQTJSONBJSONB' | 'alwayseqtjsonbjsonb'; +ALWAYSNETJSONBJSONB: 'ALWAYSNETJSONBJSONB' | 'alwaysnetjsonbjsonb'; +EVEREQTJSONBTJSONB: 'EVEREQTJSONBTJSONB' | 'evereqtjsonbtjsonb'; +EVERNETJSONBTJSONB: 'EVERNETJSONBTJSONB' | 'evernetjsonbtjsonb'; +ALWAYSEQTJSONBTJSONB: 'ALWAYSEQTJSONBTJSONB' | 'alwayseqtjsonbtjsonb'; +ALWAYSNETJSONBTJSONB: 'ALWAYSNETJSONBTJSONB' | 'alwaysnetjsonbtjsonb'; +NAD_TNPOINT_GEO: 'NAD_TNPOINT_GEO' | 'nad_tnpoint_geo'; +NAD_TNPOINT_NPOINT: 'NAD_TNPOINT_NPOINT' | 'nad_tnpoint_npoint'; +NAD_TNPOINT_TNPOINT: 'NAD_TNPOINT_TNPOINT' | 'nad_tnpoint_tnpoint'; +EVEREQNPOINTTNPOINT: 'EVEREQNPOINTTNPOINT' | 'evereqnpointtnpoint'; +EVEREQTNPOINTNPOINT: 'EVEREQTNPOINTNPOINT' | 'evereqtnpointnpoint'; +EVEREQTNPOINTTNPOINT: 'EVEREQTNPOINTTNPOINT' | 'evereqtnpointtnpoint'; +EVERNENPOINTTNPOINT: 'EVERNENPOINTTNPOINT' | 'evernenpointtnpoint'; +EVERNETNPOINTNPOINT: 'EVERNETNPOINTNPOINT' | 'evernetnpointnpoint'; +EVERNETNPOINTTNPOINT: 'EVERNETNPOINTTNPOINT' | 'evernetnpointtnpoint'; +ALWAYSEQNPOINTTNPOINT: 'ALWAYSEQNPOINTTNPOINT' | 'alwayseqnpointtnpoint'; +ALWAYSEQTNPOINTNPOINT: 'ALWAYSEQTNPOINTNPOINT' | 'alwayseqtnpointnpoint'; +ALWAYSEQTNPOINTTNPOINT: 'ALWAYSEQTNPOINTTNPOINT' | 'alwayseqtnpointtnpoint'; +ALWAYSNENPOINTTNPOINT: 'ALWAYSNENPOINTTNPOINT' | 'alwaysnenpointtnpoint'; +ALWAYSNETNPOINTNPOINT: 'ALWAYSNETNPOINTNPOINT' | 'alwaysnetnpointnpoint'; +ALWAYSNETNPOINTTNPOINT: 'ALWAYSNETNPOINTTNPOINT' | 'alwaysnetnpointtnpoint'; +NAD_TPOSE_POSE: 'NAD_TPOSE_POSE' | 'nad_tpose_pose'; +NAD_TPOSE_TPOSE: 'NAD_TPOSE_TPOSE' | 'nad_tpose_tpose'; +NAD_TPOSE_GEO: 'NAD_TPOSE_GEO' | 'nad_tpose_geo'; +EVEREQPOSETPOSE: 'EVEREQPOSETPOSE' | 'evereqposetpose'; +EVEREQTPOSEPOSE: 'EVEREQTPOSEPOSE' | 'evereqtposepose'; +EVEREQTPOSETPOSE: 'EVEREQTPOSETPOSE' | 'evereqtposetpose'; +EVERNEPOSETPOSE: 'EVERNEPOSETPOSE' | 'everneposetpose'; +EVERNETPOSEPOSE: 'EVERNETPOSEPOSE' | 'evernetposepose'; +EVERNETPOSETPOSE: 'EVERNETPOSETPOSE' | 'evernetposetpose'; +ALWAYSEQPOSETPOSE: 'ALWAYSEQPOSETPOSE' | 'alwayseqposetpose'; +ALWAYSEQTPOSEPOSE: 'ALWAYSEQTPOSEPOSE' | 'alwayseqtposepose'; +ALWAYSEQTPOSETPOSE: 'ALWAYSEQTPOSETPOSE' | 'alwayseqtposetpose'; +ALWAYSNEPOSETPOSE: 'ALWAYSNEPOSETPOSE' | 'alwaysneposetpose'; +ALWAYSNETPOSEPOSE: 'ALWAYSNETPOSEPOSE' | 'alwaysnetposepose'; +ALWAYSNETPOSETPOSE: 'ALWAYSNETPOSETPOSE' | 'alwaysnetposetpose'; +GEOMBOUNDARY: 'GEOMBOUNDARY' | 'geomboundary'; +GEOMCENTROID: 'GEOMCENTROID' | 'geomcentroid'; +GEOMCONVEXHULL: 'GEOMCONVEXHULL' | 'geomconvexhull'; +GEOREVERSE: 'GEOREVERSE' | 'georeverse'; +GEOPOINTS: 'GEOPOINTS' | 'geopoints'; +GEOMUNARYUNION: 'GEOMUNARYUNION' | 'geomunaryunion'; +GEO_SET_SRID: 'GEO_SET_SRID' | 'geo_set_srid'; +GEO_ROUND: 'GEO_ROUND' | 'geo_round'; +GEO_TRANSFORM: 'GEO_TRANSFORM' | 'geo_transform'; +GEOSRID: 'GEOSRID' | 'geosrid'; +GEONUMGEOS: 'GEONUMGEOS' | 'geonumgeos'; +GEONUMPOINTS: 'GEONUMPOINTS' | 'geonumpoints'; +GEOMLENGTH: 'GEOMLENGTH' | 'geomlength'; +GEOMPERIMETER: 'GEOMPERIMETER' | 'geomperimeter'; +GEOMISEMPTY: 'GEOMISEMPTY' | 'geomisempty'; +GEOMAZIMUTH: 'GEOMAZIMUTH' | 'geomazimuth'; +GEOISUNITARY: 'GEOISUNITARY' | 'geoisunitary'; +GEOEQUALS: 'GEOEQUALS' | 'geoequals'; +GEOSAME: 'GEOSAME' | 'geosame'; +GEOMINTERSECTS: 'GEOMINTERSECTS' | 'geomintersects'; +GEOMINTERSECTS2D: 'GEOMINTERSECTS2D' | 'geomintersects2d'; +GEOMINTERSECTS3D: 'GEOMINTERSECTS3D' | 'geomintersects3d'; +GEOMCONTAINS: 'GEOMCONTAINS' | 'geomcontains'; +GEOMCOVERS: 'GEOMCOVERS' | 'geomcovers'; +GEOMDISJOINT2D: 'GEOMDISJOINT2D' | 'geomdisjoint2d'; +GEOMTOUCHES: 'GEOMTOUCHES' | 'geomtouches'; +GEOGINTERSECTS: 'GEOGINTERSECTS' | 'geogintersects'; +GEOGDISTANCE: 'GEOGDISTANCE' | 'geogdistance'; +LINELOCATEPOINT: 'LINELOCATEPOINT' | 'linelocatepoint'; +GEOMDISTANCE2D: 'GEOMDISTANCE2D' | 'geomdistance2d'; +GEOMDISTANCE3D: 'GEOMDISTANCE3D' | 'geomdistance3d'; +GEOMDWITHIN2D: 'GEOMDWITHIN2D' | 'geomdwithin2d'; +GEOMDWITHIN3D: 'GEOMDWITHIN3D' | 'geomdwithin3d'; +GEOGDWITHIN: 'GEOGDWITHIN' | 'geogdwithin'; +GEOMDWITHIN: 'GEOMDWITHIN' | 'geomdwithin'; +GEOMINTERSECTION2D: 'GEOMINTERSECTION2D' | 'geomintersection2d'; +GEOMINTERSECTION2DCOLL: 'GEOMINTERSECTION2DCOLL' | 'geomintersection2dcoll'; +GEOMDIFFERENCE2D: 'GEOMDIFFERENCE2D' | 'geomdifference2d'; +GEOMSHORTESTLINE2D: 'GEOMSHORTESTLINE2D' | 'geomshortestline2d'; +GEOMSHORTESTLINE3D: 'GEOMSHORTESTLINE3D' | 'geomshortestline3d'; +LINE_INTERPOLATE_POINT: 'LINE_INTERPOLATE_POINT' | 'line_interpolate_point'; +LINE_SUBSTRING: 'LINE_SUBSTRING' | 'line_substring'; +LINE_NUMPOINTS: 'LINE_NUMPOINTS' | 'line_numpoints'; +LINE_POINT_N: 'LINE_POINT_N' | 'line_point_n'; +GEO_GEO_N: 'GEO_GEO_N' | 'geo_geo_n'; +GEO_AS_EWKT: 'GEO_AS_EWKT' | 'geo_as_ewkt'; +GEO_AS_GEOJSON: 'GEO_AS_GEOJSON' | 'geo_as_geojson'; +GEOM_POINT_MAKE2D: 'GEOM_POINT_MAKE2D' | 'geom_point_make2d'; +GEOM_POINT_MAKE3DZ: 'GEOM_POINT_MAKE3DZ' | 'geom_point_make3dz'; +GEOG_POINT_MAKE2D: 'GEOG_POINT_MAKE2D' | 'geog_point_make2d'; +GEOG_POINT_MAKE3DZ: 'GEOG_POINT_MAKE3DZ' | 'geog_point_make3dz'; +GEOGAREA: 'GEOGAREA' | 'geogarea'; +GEOGLENGTH: 'GEOGLENGTH' | 'geoglength'; +GEOGPERIMETER: 'GEOGPERIMETER' | 'geogperimeter'; +GEOGTOGEOM: 'GEOGTOGEOM' | 'geogtogeom'; +GEOMTOGEOG: 'GEOMTOGEOG' | 'geomtogeog'; +GEOG_CENTROID: 'GEOG_CENTROID' | 'geog_centroid'; +INTSPANLOWER: 'INTSPANLOWER' | 'intspanlower'; +INTSPANUPPER: 'INTSPANUPPER' | 'intspanupper'; +INTSPANWIDTH: 'INTSPANWIDTH' | 'intspanwidth'; +INTSPANLOWERINC: 'INTSPANLOWERINC' | 'intspanlowerinc'; +INTSPANUPPERINC: 'INTSPANUPPERINC' | 'intspanupperinc'; +FLOATSPANLOWER: 'FLOATSPANLOWER' | 'floatspanlower'; +FLOATSPANUPPER: 'FLOATSPANUPPER' | 'floatspanupper'; +FLOATSPANWIDTH: 'FLOATSPANWIDTH' | 'floatspanwidth'; +FLOATSPANLOWERINC: 'FLOATSPANLOWERINC' | 'floatspanlowerinc'; +FLOATSPANUPPERINC: 'FLOATSPANUPPERINC' | 'floatspanupperinc'; +CONTAINED_INT_SPAN: 'CONTAINED_INT_SPAN' | 'contained_int_span'; +CONTAINED_FLOAT_SPAN: 'CONTAINED_FLOAT_SPAN' | 'contained_float_span'; +CONTAINED_SPAN_SPAN: 'CONTAINED_SPAN_SPAN' | 'contained_span_span'; +CONTAINED_FLOATSPAN_SPAN: 'CONTAINED_FLOATSPAN_SPAN' | 'contained_floatspan_span'; +CONTAINS_SPAN_INT: 'CONTAINS_SPAN_INT' | 'contains_span_int'; +CONTAINS_SPAN_FLOAT: 'CONTAINS_SPAN_FLOAT' | 'contains_span_float'; +CONTAINS_SPAN_SPAN: 'CONTAINS_SPAN_SPAN' | 'contains_span_span'; +CONTAINS_FLOATSPAN_SPAN: 'CONTAINS_FLOATSPAN_SPAN' | 'contains_floatspan_span'; +ACONTAINS_GEO_TRGEOMETRY: 'ACONTAINS_GEO_TRGEOMETRY' | 'acontains_geo_trgeometry'; +ACOVERS_GEO_TRGEOMETRY: 'ACOVERS_GEO_TRGEOMETRY' | 'acovers_geo_trgeometry'; +ACOVERS_TRGEOMETRY_GEO: 'ACOVERS_TRGEOMETRY_GEO' | 'acovers_trgeometry_geo'; +ADISJOINT_TRGEOMETRY_GEO: 'ADISJOINT_TRGEOMETRY_GEO' | 'adisjoint_trgeometry_geo'; +ADISJOINT_TRGEOMETRY_TRGEOMETRY: 'ADISJOINT_TRGEOMETRY_TRGEOMETRY' | 'adisjoint_trgeometry_trgeometry'; +ADWITHIN_TRGEOMETRY_GEO: 'ADWITHIN_TRGEOMETRY_GEO' | 'adwithin_trgeometry_geo'; +ADWITHIN_TRGEOMETRY_TRGEOMETRY: 'ADWITHIN_TRGEOMETRY_TRGEOMETRY' | 'adwithin_trgeometry_trgeometry'; +AINTERSECTS_TRGEOMETRY_GEO: 'AINTERSECTS_TRGEOMETRY_GEO' | 'aintersects_trgeometry_geo'; +AINTERSECTS_TRGEOMETRY_TRGEOMETRY: 'AINTERSECTS_TRGEOMETRY_TRGEOMETRY' | 'aintersects_trgeometry_trgeometry'; +ALWAYS_EQ_GEO_TRGEOMETRY: 'ALWAYS_EQ_GEO_TRGEOMETRY' | 'always_eq_geo_trgeometry'; +ALWAYS_EQ_TRGEOMETRY_GEO: 'ALWAYS_EQ_TRGEOMETRY_GEO' | 'always_eq_trgeometry_geo'; +ALWAYS_EQ_TRGEOMETRY_TRGEOMETRY: 'ALWAYS_EQ_TRGEOMETRY_TRGEOMETRY' | 'always_eq_trgeometry_trgeometry'; +ALWAYS_NE_GEO_TRGEOMETRY: 'ALWAYS_NE_GEO_TRGEOMETRY' | 'always_ne_geo_trgeometry'; +ALWAYS_NE_TRGEOMETRY_GEO: 'ALWAYS_NE_TRGEOMETRY_GEO' | 'always_ne_trgeometry_geo'; +ALWAYS_NE_TRGEOMETRY_TRGEOMETRY: 'ALWAYS_NE_TRGEOMETRY_TRGEOMETRY' | 'always_ne_trgeometry_trgeometry'; +ATOUCHES_TRGEOMETRY_GEO: 'ATOUCHES_TRGEOMETRY_GEO' | 'atouches_trgeometry_geo'; +ECONTAINS_GEO_TRGEOMETRY: 'ECONTAINS_GEO_TRGEOMETRY' | 'econtains_geo_trgeometry'; +ECOVERS_GEO_TRGEOMETRY: 'ECOVERS_GEO_TRGEOMETRY' | 'ecovers_geo_trgeometry'; +ECOVERS_TRGEOMETRY_GEO: 'ECOVERS_TRGEOMETRY_GEO' | 'ecovers_trgeometry_geo'; +EDISJOINT_TRGEOMETRY_GEO: 'EDISJOINT_TRGEOMETRY_GEO' | 'edisjoint_trgeometry_geo'; +EDISJOINT_TRGEOMETRY_TRGEOMETRY: 'EDISJOINT_TRGEOMETRY_TRGEOMETRY' | 'edisjoint_trgeometry_trgeometry'; +EDWITHIN_TRGEOMETRY_GEO: 'EDWITHIN_TRGEOMETRY_GEO' | 'edwithin_trgeometry_geo'; +EDWITHIN_TRGEOMETRY_TRGEOMETRY: 'EDWITHIN_TRGEOMETRY_TRGEOMETRY' | 'edwithin_trgeometry_trgeometry'; +EINTERSECTS_TRGEOMETRY_GEO: 'EINTERSECTS_TRGEOMETRY_GEO' | 'eintersects_trgeometry_geo'; +EINTERSECTS_TRGEOMETRY_TRGEOMETRY: 'EINTERSECTS_TRGEOMETRY_TRGEOMETRY' | 'eintersects_trgeometry_trgeometry'; +ETOUCHES_TRGEOMETRY_GEO: 'ETOUCHES_TRGEOMETRY_GEO' | 'etouches_trgeometry_geo'; +EVER_EQ_GEO_TRGEOMETRY: 'EVER_EQ_GEO_TRGEOMETRY' | 'ever_eq_geo_trgeometry'; +EVER_EQ_TRGEOMETRY_GEO: 'EVER_EQ_TRGEOMETRY_GEO' | 'ever_eq_trgeometry_geo'; +EVER_EQ_TRGEOMETRY_TRGEOMETRY: 'EVER_EQ_TRGEOMETRY_TRGEOMETRY' | 'ever_eq_trgeometry_trgeometry'; +EVER_NE_GEO_TRGEOMETRY: 'EVER_NE_GEO_TRGEOMETRY' | 'ever_ne_geo_trgeometry'; +EVER_NE_TRGEOMETRY_GEO: 'EVER_NE_TRGEOMETRY_GEO' | 'ever_ne_trgeometry_geo'; +EVER_NE_TRGEOMETRY_TRGEOMETRY: 'EVER_NE_TRGEOMETRY_TRGEOMETRY' | 'ever_ne_trgeometry_trgeometry'; +NAD_TRGEOMETRY_GEO: 'NAD_TRGEOMETRY_GEO' | 'nad_trgeometry_geo'; +NAD_TRGEOMETRY_TRGEOMETRY: 'NAD_TRGEOMETRY_TRGEOMETRY' | 'nad_trgeometry_trgeometry'; +TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY: 'TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY' | 'temporal_eintersects_tpose_geometry'; +TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY: 'TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY' | 'temporal_aintersects_tpose_geometry'; +TEMPORAL_ECOVERS_TPOSE_GEOMETRY: 'TEMPORAL_ECOVERS_TPOSE_GEOMETRY' | 'temporal_ecovers_tpose_geometry'; +TEMPORAL_EDISJOINT_TPOSE_GEOMETRY: 'TEMPORAL_EDISJOINT_TPOSE_GEOMETRY' | 'temporal_edisjoint_tpose_geometry'; +TEMPORAL_ADISJOINT_TPOSE_GEOMETRY: 'TEMPORAL_ADISJOINT_TPOSE_GEOMETRY' | 'temporal_adisjoint_tpose_geometry'; +TEMPORAL_ETOUCHES_TPOSE_GEOMETRY: 'TEMPORAL_ETOUCHES_TPOSE_GEOMETRY' | 'temporal_etouches_tpose_geometry'; +TEMPORAL_ATOUCHES_TPOSE_GEOMETRY: 'TEMPORAL_ATOUCHES_TPOSE_GEOMETRY' | 'temporal_atouches_tpose_geometry'; +TEMPORAL_ECONTAINS_TPOSE_GEOMETRY: 'TEMPORAL_ECONTAINS_TPOSE_GEOMETRY' | 'temporal_econtains_tpose_geometry'; +TEMPORAL_ACONTAINS_TPOSE_GEOMETRY: 'TEMPORAL_ACONTAINS_TPOSE_GEOMETRY' | 'temporal_acontains_tpose_geometry'; +TEMPORAL_EDWITHIN_TPOSE_GEOMETRY: 'TEMPORAL_EDWITHIN_TPOSE_GEOMETRY' | 'temporal_edwithin_tpose_geometry'; +TEMPORAL_ADWITHIN_TPOSE_GEOMETRY: 'TEMPORAL_ADWITHIN_TPOSE_GEOMETRY' | 'temporal_adwithin_tpose_geometry'; +TEMPORAL_EINTERSECTS_TPOSE_TPOSE: 'TEMPORAL_EINTERSECTS_TPOSE_TPOSE' | 'temporal_eintersects_tpose_tpose'; +TEMPORAL_AINTERSECTS_TPOSE_TPOSE: 'TEMPORAL_AINTERSECTS_TPOSE_TPOSE' | 'temporal_aintersects_tpose_tpose'; +TEMPORAL_ECOVERS_TPOSE_TPOSE: 'TEMPORAL_ECOVERS_TPOSE_TPOSE' | 'temporal_ecovers_tpose_tpose'; +TEMPORAL_EDISJOINT_TPOSE_TPOSE: 'TEMPORAL_EDISJOINT_TPOSE_TPOSE' | 'temporal_edisjoint_tpose_tpose'; +TEMPORAL_ADISJOINT_TPOSE_TPOSE: 'TEMPORAL_ADISJOINT_TPOSE_TPOSE' | 'temporal_adisjoint_tpose_tpose'; +TEMPORAL_ETOUCHES_TPOSE_TPOSE: 'TEMPORAL_ETOUCHES_TPOSE_TPOSE' | 'temporal_etouches_tpose_tpose'; +TEMPORAL_ATOUCHES_TPOSE_TPOSE: 'TEMPORAL_ATOUCHES_TPOSE_TPOSE' | 'temporal_atouches_tpose_tpose'; +TEMPORAL_ECONTAINS_TPOSE_TPOSE: 'TEMPORAL_ECONTAINS_TPOSE_TPOSE' | 'temporal_econtains_tpose_tpose'; +TEMPORAL_ACONTAINS_TPOSE_TPOSE: 'TEMPORAL_ACONTAINS_TPOSE_TPOSE' | 'temporal_acontains_tpose_tpose'; +TEMPORAL_EDWITHIN_TPOSE_TPOSE: 'TEMPORAL_EDWITHIN_TPOSE_TPOSE' | 'temporal_edwithin_tpose_tpose'; +TEMPORAL_ADWITHIN_TPOSE_TPOSE: 'TEMPORAL_ADWITHIN_TPOSE_TPOSE' | 'temporal_adwithin_tpose_tpose'; +TEMPORAL_NAD_TPOSE_GEOMETRY: 'TEMPORAL_NAD_TPOSE_GEOMETRY' | 'temporal_nad_tpose_geometry'; +TEMPORAL_NAD_TPOSE_TPOSE: 'TEMPORAL_NAD_TPOSE_TPOSE' | 'temporal_nad_tpose_tpose'; +TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY: 'TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY' | 'temporal_eintersects_tnpoint_geometry'; +TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY: 'TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY' | 'temporal_aintersects_tnpoint_geometry'; +TEMPORAL_ECOVERS_TNPOINT_GEOMETRY: 'TEMPORAL_ECOVERS_TNPOINT_GEOMETRY' | 'temporal_ecovers_tnpoint_geometry'; +TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY: 'TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY' | 'temporal_edisjoint_tnpoint_geometry'; +TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY: 'TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY' | 'temporal_adisjoint_tnpoint_geometry'; +TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY: 'TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY' | 'temporal_etouches_tnpoint_geometry'; +TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY: 'TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY' | 'temporal_atouches_tnpoint_geometry'; +TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY: 'TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY' | 'temporal_econtains_tnpoint_geometry'; +TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY: 'TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY' | 'temporal_acontains_tnpoint_geometry'; +TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY: 'TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY' | 'temporal_edwithin_tnpoint_geometry'; +TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY: 'TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY' | 'temporal_adwithin_tnpoint_geometry'; +TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT: 'TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT' | 'temporal_eintersects_tnpoint_tnpoint'; +TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT: 'TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT' | 'temporal_aintersects_tnpoint_tnpoint'; +TEMPORAL_ECOVERS_TNPOINT_TNPOINT: 'TEMPORAL_ECOVERS_TNPOINT_TNPOINT' | 'temporal_ecovers_tnpoint_tnpoint'; +TEMPORAL_EDISJOINT_TNPOINT_TNPOINT: 'TEMPORAL_EDISJOINT_TNPOINT_TNPOINT' | 'temporal_edisjoint_tnpoint_tnpoint'; +TEMPORAL_ADISJOINT_TNPOINT_TNPOINT: 'TEMPORAL_ADISJOINT_TNPOINT_TNPOINT' | 'temporal_adisjoint_tnpoint_tnpoint'; +TEMPORAL_ETOUCHES_TNPOINT_TNPOINT: 'TEMPORAL_ETOUCHES_TNPOINT_TNPOINT' | 'temporal_etouches_tnpoint_tnpoint'; +TEMPORAL_ATOUCHES_TNPOINT_TNPOINT: 'TEMPORAL_ATOUCHES_TNPOINT_TNPOINT' | 'temporal_atouches_tnpoint_tnpoint'; +TEMPORAL_ECONTAINS_TNPOINT_TNPOINT: 'TEMPORAL_ECONTAINS_TNPOINT_TNPOINT' | 'temporal_econtains_tnpoint_tnpoint'; +TEMPORAL_ACONTAINS_TNPOINT_TNPOINT: 'TEMPORAL_ACONTAINS_TNPOINT_TNPOINT' | 'temporal_acontains_tnpoint_tnpoint'; +TEMPORAL_EDWITHIN_TNPOINT_TNPOINT: 'TEMPORAL_EDWITHIN_TNPOINT_TNPOINT' | 'temporal_edwithin_tnpoint_tnpoint'; +TEMPORAL_ADWITHIN_TNPOINT_TNPOINT: 'TEMPORAL_ADWITHIN_TNPOINT_TNPOINT' | 'temporal_adwithin_tnpoint_tnpoint'; +TEMPORAL_NAD_TNPOINT_GEOMETRY: 'TEMPORAL_NAD_TNPOINT_GEOMETRY' | 'temporal_nad_tnpoint_geometry'; +TEMPORAL_NAD_TNPOINT_TNPOINT: 'TEMPORAL_NAD_TNPOINT_TNPOINT' | 'temporal_nad_tnpoint_tnpoint'; +ABOVESTBOXSTBOX: 'ABOVESTBOXSTBOX' | 'abovestboxstbox'; +ADJACENTSTBOXSTBOX: 'ADJACENTSTBOXSTBOX' | 'adjacentstboxstbox'; +AFTERSTBOXSTBOX: 'AFTERSTBOXSTBOX' | 'afterstboxstbox'; +BACKSTBOXSTBOX: 'BACKSTBOXSTBOX' | 'backstboxstbox'; +BEFORESTBOXSTBOX: 'BEFORESTBOXSTBOX' | 'beforestboxstbox'; +BELOWSTBOXSTBOX: 'BELOWSTBOXSTBOX' | 'belowstboxstbox'; +CONTAINEDSTBOXSTBOX: 'CONTAINEDSTBOXSTBOX' | 'containedstboxstbox'; +CONTAINSSTBOXSTBOX: 'CONTAINSSTBOXSTBOX' | 'containsstboxstbox'; +FRONTSTBOXSTBOX: 'FRONTSTBOXSTBOX' | 'frontstboxstbox'; +LEFTSTBOXSTBOX: 'LEFTSTBOXSTBOX' | 'leftstboxstbox'; +OVERABOVESTBOXSTBOX: 'OVERABOVESTBOXSTBOX' | 'overabovestboxstbox'; +OVERAFTERSTBOXSTBOX: 'OVERAFTERSTBOXSTBOX' | 'overafterstboxstbox'; +OVERBACKSTBOXSTBOX: 'OVERBACKSTBOXSTBOX' | 'overbackstboxstbox'; +OVERBEFORESTBOXSTBOX: 'OVERBEFORESTBOXSTBOX' | 'overbeforestboxstbox'; +OVERBELOWSTBOXSTBOX: 'OVERBELOWSTBOXSTBOX' | 'overbelowstboxstbox'; +OVERFRONTSTBOXSTBOX: 'OVERFRONTSTBOXSTBOX' | 'overfrontstboxstbox'; +OVERLAPSSTBOXSTBOX: 'OVERLAPSSTBOXSTBOX' | 'overlapsstboxstbox'; +OVERLEFTSTBOXSTBOX: 'OVERLEFTSTBOXSTBOX' | 'overleftstboxstbox'; +OVERRIGHTSTBOXSTBOX: 'OVERRIGHTSTBOXSTBOX' | 'overrightstboxstbox'; +RIGHTSTBOXSTBOX: 'RIGHTSTBOXSTBOX' | 'rightstboxstbox'; +SAMESTBOXSTBOX: 'SAMESTBOXSTBOX' | 'samestboxstbox'; +STBOXEQ: 'STBOXEQ' | 'stboxeq'; +STBOXGE: 'STBOXGE' | 'stboxge'; +STBOXGT: 'STBOXGT' | 'stboxgt'; +STBOXLE: 'STBOXLE' | 'stboxle'; +STBOXLT: 'STBOXLT' | 'stboxlt'; +STBOXNE: 'STBOXNE' | 'stboxne'; +NAD_STBOX_STBOX: 'NAD_STBOX_STBOX' | 'nad_stbox_stbox'; +STBOX_CMP: 'STBOX_CMP' | 'stbox_cmp'; +ABOVESTBOXTSPATIAL: 'ABOVESTBOXTSPATIAL' | 'abovestboxtspatial'; +ADJACENTSTBOXTSPATIAL: 'ADJACENTSTBOXTSPATIAL' | 'adjacentstboxtspatial'; +AFTERSTBOXTSPATIAL: 'AFTERSTBOXTSPATIAL' | 'afterstboxtspatial'; +BACKSTBOXTSPATIAL: 'BACKSTBOXTSPATIAL' | 'backstboxtspatial'; +BEFORESTBOXTSPATIAL: 'BEFORESTBOXTSPATIAL' | 'beforestboxtspatial'; +BELOWSTBOXTSPATIAL: 'BELOWSTBOXTSPATIAL' | 'belowstboxtspatial'; +CONTAINEDSTBOXTSPATIAL: 'CONTAINEDSTBOXTSPATIAL' | 'containedstboxtspatial'; +CONTAINSSTBOXTSPATIAL: 'CONTAINSSTBOXTSPATIAL' | 'containsstboxtspatial'; +FRONTSTBOXTSPATIAL: 'FRONTSTBOXTSPATIAL' | 'frontstboxtspatial'; +LEFTSTBOXTSPATIAL: 'LEFTSTBOXTSPATIAL' | 'leftstboxtspatial'; +OVERABOVESTBOXTSPATIAL: 'OVERABOVESTBOXTSPATIAL' | 'overabovestboxtspatial'; +OVERAFTERSTBOXTSPATIAL: 'OVERAFTERSTBOXTSPATIAL' | 'overafterstboxtspatial'; +OVERBACKSTBOXTSPATIAL: 'OVERBACKSTBOXTSPATIAL' | 'overbackstboxtspatial'; +OVERBEFORESTBOXTSPATIAL: 'OVERBEFORESTBOXTSPATIAL' | 'overbeforestboxtspatial'; +OVERBELOWSTBOXTSPATIAL: 'OVERBELOWSTBOXTSPATIAL' | 'overbelowstboxtspatial'; +OVERFRONTSTBOXTSPATIAL: 'OVERFRONTSTBOXTSPATIAL' | 'overfrontstboxtspatial'; +OVERLAPSSTBOXTSPATIAL: 'OVERLAPSSTBOXTSPATIAL' | 'overlapsstboxtspatial'; +OVERLEFTSTBOXTSPATIAL: 'OVERLEFTSTBOXTSPATIAL' | 'overleftstboxtspatial'; +OVERRIGHTSTBOXTSPATIAL: 'OVERRIGHTSTBOXTSPATIAL' | 'overrightstboxtspatial'; +RIGHTSTBOXTSPATIAL: 'RIGHTSTBOXTSPATIAL' | 'rightstboxtspatial'; +SAMESTBOXTSPATIAL: 'SAMESTBOXTSPATIAL' | 'samestboxtspatial'; +ABOVETSPATIALSTBOX: 'ABOVETSPATIALSTBOX' | 'abovetspatialstbox'; +ADJACENTTSPATIALSTBOX: 'ADJACENTTSPATIALSTBOX' | 'adjacenttspatialstbox'; +AFTERTSPATIALSTBOX: 'AFTERTSPATIALSTBOX' | 'aftertspatialstbox'; +BACKTSPATIALSTBOX: 'BACKTSPATIALSTBOX' | 'backtspatialstbox'; +BEFORETSPATIALSTBOX: 'BEFORETSPATIALSTBOX' | 'beforetspatialstbox'; +BELOWTSPATIALSTBOX: 'BELOWTSPATIALSTBOX' | 'belowtspatialstbox'; +CONTAINEDTSPATIALSTBOX: 'CONTAINEDTSPATIALSTBOX' | 'containedtspatialstbox'; +CONTAINSTSPATIALSTBOX: 'CONTAINSTSPATIALSTBOX' | 'containstspatialstbox'; +FRONTTSPATIALSTBOX: 'FRONTTSPATIALSTBOX' | 'fronttspatialstbox'; +LEFTTSPATIALSTBOX: 'LEFTTSPATIALSTBOX' | 'lefttspatialstbox'; +OVERABOVETSPATIALSTBOX: 'OVERABOVETSPATIALSTBOX' | 'overabovetspatialstbox'; +OVERAFTERTSPATIALSTBOX: 'OVERAFTERTSPATIALSTBOX' | 'overaftertspatialstbox'; +OVERBACKTSPATIALSTBOX: 'OVERBACKTSPATIALSTBOX' | 'overbacktspatialstbox'; +OVERBEFORETSPATIALSTBOX: 'OVERBEFORETSPATIALSTBOX' | 'overbeforetspatialstbox'; +OVERBELOWTSPATIALSTBOX: 'OVERBELOWTSPATIALSTBOX' | 'overbelowtspatialstbox'; +OVERFRONTTSPATIALSTBOX: 'OVERFRONTTSPATIALSTBOX' | 'overfronttspatialstbox'; +OVERLAPSTSPATIALSTBOX: 'OVERLAPSTSPATIALSTBOX' | 'overlapstspatialstbox'; +OVERLEFTTSPATIALSTBOX: 'OVERLEFTTSPATIALSTBOX' | 'overlefttspatialstbox'; +OVERRIGHTTSPATIALSTBOX: 'OVERRIGHTTSPATIALSTBOX' | 'overrighttspatialstbox'; +RIGHTTSPATIALSTBOX: 'RIGHTTSPATIALSTBOX' | 'righttspatialstbox'; +SAMETSPATIALSTBOX: 'SAMETSPATIALSTBOX' | 'sametspatialstbox'; +NAD_TGEO_STBOX: 'NAD_TGEO_STBOX' | 'nad_tgeo_stbox'; +ADJACENTTBOXTNUMBER: 'ADJACENTTBOXTNUMBER' | 'adjacenttboxtnumber'; +AFTERTBOXTNUMBER: 'AFTERTBOXTNUMBER' | 'aftertboxtnumber'; +BEFORETBOXTNUMBER: 'BEFORETBOXTNUMBER' | 'beforetboxtnumber'; +CONTAINEDTBOXTNUMBER: 'CONTAINEDTBOXTNUMBER' | 'containedtboxtnumber'; +CONTAINSTBOXTNUMBER: 'CONTAINSTBOXTNUMBER' | 'containstboxtnumber'; +LEFTTBOXTNUMBER: 'LEFTTBOXTNUMBER' | 'lefttboxtnumber'; +OVERAFTERTBOXTNUMBER: 'OVERAFTERTBOXTNUMBER' | 'overaftertboxtnumber'; +OVERBEFORETBOXTNUMBER: 'OVERBEFORETBOXTNUMBER' | 'overbeforetboxtnumber'; +OVERLAPSTBOXTNUMBER: 'OVERLAPSTBOXTNUMBER' | 'overlapstboxtnumber'; +OVERLEFTTBOXTNUMBER: 'OVERLEFTTBOXTNUMBER' | 'overlefttboxtnumber'; +OVERRIGHTTBOXTNUMBER: 'OVERRIGHTTBOXTNUMBER' | 'overrighttboxtnumber'; +RIGHTTBOXTNUMBER: 'RIGHTTBOXTNUMBER' | 'righttboxtnumber'; +SAMETBOXTNUMBER: 'SAMETBOXTNUMBER' | 'sametboxtnumber'; +ADJACENTTNUMBERTBOX: 'ADJACENTTNUMBERTBOX' | 'adjacenttnumbertbox'; +AFTERTNUMBERTBOX: 'AFTERTNUMBERTBOX' | 'aftertnumbertbox'; +BEFORETNUMBERTBOX: 'BEFORETNUMBERTBOX' | 'beforetnumbertbox'; +CONTAINEDTNUMBERTBOX: 'CONTAINEDTNUMBERTBOX' | 'containedtnumbertbox'; +CONTAINSTNUMBERTBOX: 'CONTAINSTNUMBERTBOX' | 'containstnumbertbox'; +LEFTTNUMBERTBOX: 'LEFTTNUMBERTBOX' | 'lefttnumbertbox'; +OVERAFTERTNUMBERTBOX: 'OVERAFTERTNUMBERTBOX' | 'overaftertnumbertbox'; +OVERBEFORETNUMBERTBOX: 'OVERBEFORETNUMBERTBOX' | 'overbeforetnumbertbox'; +OVERLAPSTNUMBERTBOX: 'OVERLAPSTNUMBERTBOX' | 'overlapstnumbertbox'; +OVERLEFTTNUMBERTBOX: 'OVERLEFTTNUMBERTBOX' | 'overlefttnumbertbox'; +OVERRIGHTTNUMBERTBOX: 'OVERRIGHTTNUMBERTBOX' | 'overrighttnumbertbox'; +RIGHTTNUMBERTBOX: 'RIGHTTNUMBERTBOX' | 'righttnumbertbox'; +SAMETNUMBERTBOX: 'SAMETNUMBERTBOX' | 'sametnumbertbox'; +NAD_TFLOAT_TBOX: 'NAD_TFLOAT_TBOX' | 'nad_tfloat_tbox'; +NAD_TINT_TBOX: 'NAD_TINT_TBOX' | 'nad_tint_tbox'; +ADJACENTTNUMBERTNUMBER: 'ADJACENTTNUMBERTNUMBER' | 'adjacenttnumbertnumber'; +AFTERTNUMBERTNUMBER: 'AFTERTNUMBERTNUMBER' | 'aftertnumbertnumber'; +BEFORETNUMBERTNUMBER: 'BEFORETNUMBERTNUMBER' | 'beforetnumbertnumber'; +CONTAINEDTNUMBERTNUMBER: 'CONTAINEDTNUMBERTNUMBER' | 'containedtnumbertnumber'; +CONTAINSTNUMBERTNUMBER: 'CONTAINSTNUMBERTNUMBER' | 'containstnumbertnumber'; +LEFTTNUMBERTNUMBER: 'LEFTTNUMBERTNUMBER' | 'lefttnumbertnumber'; +OVERAFTERTNUMBERTNUMBER: 'OVERAFTERTNUMBERTNUMBER' | 'overaftertnumbertnumber'; +OVERBEFORETNUMBERTNUMBER: 'OVERBEFORETNUMBERTNUMBER' | 'overbeforetnumbertnumber'; +OVERLAPSTNUMBERTNUMBER: 'OVERLAPSTNUMBERTNUMBER' | 'overlapstnumbertnumber'; +OVERLEFTTNUMBERTNUMBER: 'OVERLEFTTNUMBERTNUMBER' | 'overlefttnumbertnumber'; +OVERRIGHTTNUMBERTNUMBER: 'OVERRIGHTTNUMBERTNUMBER' | 'overrighttnumbertnumber'; +RIGHTTNUMBERTNUMBER: 'RIGHTTNUMBERTNUMBER' | 'righttnumbertnumber'; +SAMETNUMBERTNUMBER: 'SAMETNUMBERTNUMBER' | 'sametnumbertnumber'; +TBOOL_END_VALUE: 'TBOOL_END_VALUE' | 'tbool_end_value'; +TBOOL_START_VALUE: 'TBOOL_START_VALUE' | 'tbool_start_value'; +ABOVETSPATIALTSPATIAL: 'ABOVETSPATIALTSPATIAL' | 'abovetspatialtspatial'; +ADJACENTTSPATIALTSPATIAL: 'ADJACENTTSPATIALTSPATIAL' | 'adjacenttspatialtspatial'; +AFTERTSPATIALTSPATIAL: 'AFTERTSPATIALTSPATIAL' | 'aftertspatialtspatial'; +BACKTSPATIALTSPATIAL: 'BACKTSPATIALTSPATIAL' | 'backtspatialtspatial'; +BEFORETSPATIALTSPATIAL: 'BEFORETSPATIALTSPATIAL' | 'beforetspatialtspatial'; +BELOWTSPATIALTSPATIAL: 'BELOWTSPATIALTSPATIAL' | 'belowtspatialtspatial'; +CONTAINEDTSPATIALTSPATIAL: 'CONTAINEDTSPATIALTSPATIAL' | 'containedtspatialtspatial'; +CONTAINSTSPATIALTSPATIAL: 'CONTAINSTSPATIALTSPATIAL' | 'containstspatialtspatial'; +FRONTTSPATIALTSPATIAL: 'FRONTTSPATIALTSPATIAL' | 'fronttspatialtspatial'; +LEFTTSPATIALTSPATIAL: 'LEFTTSPATIALTSPATIAL' | 'lefttspatialtspatial'; +OVERABOVETSPATIALTSPATIAL: 'OVERABOVETSPATIALTSPATIAL' | 'overabovetspatialtspatial'; +OVERAFTERTSPATIALTSPATIAL: 'OVERAFTERTSPATIALTSPATIAL' | 'overaftertspatialtspatial'; +OVERBACKTSPATIALTSPATIAL: 'OVERBACKTSPATIALTSPATIAL' | 'overbacktspatialtspatial'; +OVERBEFORETSPATIALTSPATIAL: 'OVERBEFORETSPATIALTSPATIAL' | 'overbeforetspatialtspatial'; +OVERBELOWTSPATIALTSPATIAL: 'OVERBELOWTSPATIALTSPATIAL' | 'overbelowtspatialtspatial'; +OVERFRONTTSPATIALTSPATIAL: 'OVERFRONTTSPATIALTSPATIAL' | 'overfronttspatialtspatial'; +OVERLAPSTSPATIALTSPATIAL: 'OVERLAPSTSPATIALTSPATIAL' | 'overlapstspatialtspatial'; +OVERLEFTTSPATIALTSPATIAL: 'OVERLEFTTSPATIALTSPATIAL' | 'overlefttspatialtspatial'; +OVERRIGHTTSPATIALTSPATIAL: 'OVERRIGHTTSPATIALTSPATIAL' | 'overrighttspatialtspatial'; +RIGHTTSPATIALTSPATIAL: 'RIGHTTSPATIALTSPATIAL' | 'righttspatialtspatial'; +SAMETSPATIALTSPATIAL: 'SAMETSPATIALTSPATIAL' | 'sametspatialtspatial'; +ADJACENTTEMPORALTEMPORAL: 'ADJACENTTEMPORALTEMPORAL' | 'adjacenttemporaltemporal'; +AFTERTEMPORALTEMPORAL: 'AFTERTEMPORALTEMPORAL' | 'aftertemporaltemporal'; +BEFORETEMPORALTEMPORAL: 'BEFORETEMPORALTEMPORAL' | 'beforetemporaltemporal'; +CONTAINEDTEMPORALTEMPORAL: 'CONTAINEDTEMPORALTEMPORAL' | 'containedtemporaltemporal'; +CONTAINSTEMPORALTEMPORAL: 'CONTAINSTEMPORALTEMPORAL' | 'containstemporaltemporal'; +OVERAFTERTEMPORALTEMPORAL: 'OVERAFTERTEMPORALTEMPORAL' | 'overaftertemporaltemporal'; +OVERBEFORETEMPORALTEMPORAL: 'OVERBEFORETEMPORALTEMPORAL' | 'overbeforetemporaltemporal'; +OVERLAPSTEMPORALTEMPORAL: 'OVERLAPSTEMPORALTEMPORAL' | 'overlapstemporaltemporal'; +SAMETEMPORALTEMPORAL: 'SAMETEMPORALTEMPORAL' | 'sametemporaltemporal'; +TEMPORALCMP: 'TEMPORALCMP' | 'temporalcmp'; +TEMPORALEQ: 'TEMPORALEQ' | 'temporaleq'; +TEMPORALGE: 'TEMPORALGE' | 'temporalge'; +TEMPORALGT: 'TEMPORALGT' | 'temporalgt'; +TEMPORALLE: 'TEMPORALLE' | 'temporalle'; +TEMPORALLT: 'TEMPORALLT' | 'temporallt'; +TEMPORALNE: 'TEMPORALNE' | 'temporalne'; +ALWAYSEQTEMPORALTEMPORAL: 'ALWAYSEQTEMPORALTEMPORAL' | 'alwayseqtemporaltemporal'; +ALWAYSGETEMPORALTEMPORAL: 'ALWAYSGETEMPORALTEMPORAL' | 'alwaysgetemporaltemporal'; +ALWAYSGTTEMPORALTEMPORAL: 'ALWAYSGTTEMPORALTEMPORAL' | 'alwaysgttemporaltemporal'; +ALWAYSLETEMPORALTEMPORAL: 'ALWAYSLETEMPORALTEMPORAL' | 'alwaysletemporaltemporal'; +ALWAYSLTTEMPORALTEMPORAL: 'ALWAYSLTTEMPORALTEMPORAL' | 'alwayslttemporaltemporal'; +ALWAYSNETEMPORALTEMPORAL: 'ALWAYSNETEMPORALTEMPORAL' | 'alwaysnetemporaltemporal'; +EVEREQTEMPORALTEMPORAL: 'EVEREQTEMPORALTEMPORAL' | 'evereqtemporaltemporal'; +EVERGETEMPORALTEMPORAL: 'EVERGETEMPORALTEMPORAL' | 'evergetemporaltemporal'; +EVERGTTEMPORALTEMPORAL: 'EVERGTTEMPORALTEMPORAL' | 'evergttemporaltemporal'; +EVERLETEMPORALTEMPORAL: 'EVERLETEMPORALTEMPORAL' | 'everletemporaltemporal'; +EVERLTTEMPORALTEMPORAL: 'EVERLTTEMPORALTEMPORAL' | 'everlttemporaltemporal'; +EVERNETEMPORALTEMPORAL: 'EVERNETEMPORALTEMPORAL' | 'evernetemporaltemporal'; +TEMPORALFRECHETDISTANCE: 'TEMPORALFRECHETDISTANCE' | 'temporalfrechetdistance'; +TEMPORALHAUSDORFFDISTANCE: 'TEMPORALHAUSDORFFDISTANCE' | 'temporalhausdorffdistance'; +TEMPORALDYNTIMEWARPDISTANCE: 'TEMPORALDYNTIMEWARPDISTANCE' | 'temporaldyntimewarpdistance'; +TEMPORALNADTGEOMETRY: 'TEMPORALNADTGEOMETRY' | 'temporalnadtgeometry'; +TEMPORAL_NAD_TFLOAT: 'TEMPORAL_NAD_TFLOAT' | 'temporal_nad_tfloat'; +TEMPORAL_NAD_TINT: 'TEMPORAL_NAD_TINT' | 'temporal_nad_tint'; +ALWAYSEQTFLOATFLOAT: 'ALWAYSEQTFLOATFLOAT' | 'alwayseqtfloatfloat'; +ALWAYSGETFLOATFLOAT: 'ALWAYSGETFLOATFLOAT' | 'alwaysgetfloatfloat'; +ALWAYSGTTFLOATFLOAT: 'ALWAYSGTTFLOATFLOAT' | 'alwaysgttfloatfloat'; +ALWAYSLETFLOATFLOAT: 'ALWAYSLETFLOATFLOAT' | 'alwaysletfloatfloat'; +ALWAYSLTTFLOATFLOAT: 'ALWAYSLTTFLOATFLOAT' | 'alwayslttfloatfloat'; +ALWAYSNETFLOATFLOAT: 'ALWAYSNETFLOATFLOAT' | 'alwaysnetfloatfloat'; +EVEREQTFLOATFLOAT: 'EVEREQTFLOATFLOAT' | 'evereqtfloatfloat'; +EVERGETFLOATFLOAT: 'EVERGETFLOATFLOAT' | 'evergetfloatfloat'; +EVERGTTFLOATFLOAT: 'EVERGTTFLOATFLOAT' | 'evergttfloatfloat'; +EVERLETFLOATFLOAT: 'EVERLETFLOATFLOAT' | 'everletfloatfloat'; +EVERLTTFLOATFLOAT: 'EVERLTTFLOATFLOAT' | 'everlttfloatfloat'; +EVERNETFLOATFLOAT: 'EVERNETFLOATFLOAT' | 'evernetfloatfloat'; +ALWAYSEQTINTINT: 'ALWAYSEQTINTINT' | 'alwayseqtintint'; +ALWAYSGETINTINT: 'ALWAYSGETINTINT' | 'alwaysgetintint'; +ALWAYSGTTINTINT: 'ALWAYSGTTINTINT' | 'alwaysgttintint'; +ALWAYSLETINTINT: 'ALWAYSLETINTINT' | 'alwaysletintint'; +ALWAYSLTTINTINT: 'ALWAYSLTTINTINT' | 'alwayslttintint'; +ALWAYSNETINTINT: 'ALWAYSNETINTINT' | 'alwaysnetintint'; +EVEREQTINTINT: 'EVEREQTINTINT' | 'evereqtintint'; +EVERGETINTINT: 'EVERGETINTINT' | 'evergetintint'; +EVERGTTINTINT: 'EVERGTTINTINT' | 'evergttintint'; +EVERLETINTINT: 'EVERLETINTINT' | 'everletintint'; +EVERLTTINTINT: 'EVERLTTINTINT' | 'everlttintint'; +EVERNETINTINT: 'EVERNETINTINT' | 'evernetintint'; +TEMPORAL_NAD_FLOAT_SCALAR: 'TEMPORAL_NAD_FLOAT_SCALAR' | 'temporal_nad_float_scalar'; +TEMPORAL_NAD_INT_SCALAR: 'TEMPORAL_NAD_INT_SCALAR' | 'temporal_nad_int_scalar'; +ALWAYSEQFLOATTFLOAT: 'ALWAYSEQFLOATTFLOAT' | 'alwayseqfloattfloat'; +ALWAYSGEFLOATTFLOAT: 'ALWAYSGEFLOATTFLOAT' | 'alwaysgefloattfloat'; +ALWAYSGTFLOATTFLOAT: 'ALWAYSGTFLOATTFLOAT' | 'alwaysgtfloattfloat'; +ALWAYSLEFLOATTFLOAT: 'ALWAYSLEFLOATTFLOAT' | 'alwayslefloattfloat'; +ALWAYSLTFLOATTFLOAT: 'ALWAYSLTFLOATTFLOAT' | 'alwaysltfloattfloat'; +ALWAYSNEFLOATTFLOAT: 'ALWAYSNEFLOATTFLOAT' | 'alwaysnefloattfloat'; +EVEREQFLOATTFLOAT: 'EVEREQFLOATTFLOAT' | 'evereqfloattfloat'; +EVERGEFLOATTFLOAT: 'EVERGEFLOATTFLOAT' | 'evergefloattfloat'; +EVERGTFLOATTFLOAT: 'EVERGTFLOATTFLOAT' | 'evergtfloattfloat'; +EVERLEFLOATTFLOAT: 'EVERLEFLOATTFLOAT' | 'everlefloattfloat'; +EVERLTFLOATTFLOAT: 'EVERLTFLOATTFLOAT' | 'everltfloattfloat'; +EVERNEFLOATTFLOAT: 'EVERNEFLOATTFLOAT' | 'evernefloattfloat'; +ALWAYSEQINTTINT: 'ALWAYSEQINTTINT' | 'alwayseqinttint'; +ALWAYSGEINTTINT: 'ALWAYSGEINTTINT' | 'alwaysgeinttint'; +ALWAYSGTINTTINT: 'ALWAYSGTINTTINT' | 'alwaysgtinttint'; +ALWAYSLEINTTINT: 'ALWAYSLEINTTINT' | 'alwaysleinttint'; +ALWAYSLTINTTINT: 'ALWAYSLTINTTINT' | 'alwaysltinttint'; +ALWAYSNEINTTINT: 'ALWAYSNEINTTINT' | 'alwaysneinttint'; +EVEREQINTTINT: 'EVEREQINTTINT' | 'evereqinttint'; +EVERGEINTTINT: 'EVERGEINTTINT' | 'evergeinttint'; +EVERGTINTTINT: 'EVERGTINTTINT' | 'evergtinttint'; +EVERLEINTTINT: 'EVERLEINTTINT' | 'everleinttint'; +EVERLTINTTINT: 'EVERLTINTTINT' | 'everltinttint'; +EVERNEINTTINT: 'EVERNEINTTINT' | 'everneinttint'; +MULTTNUMBERTNUMBER: 'MULTTNUMBERTNUMBER' | 'multtnumbertnumber'; +TCONTAINSTGEOTGEO: 'TCONTAINSTGEOTGEO' | 'tcontainstgeotgeo'; +TCOVERSTGEOTGEO: 'TCOVERSTGEOTGEO' | 'tcoverstgeotgeo'; +TDISTANCETGEOTGEO: 'TDISTANCETGEOTGEO' | 'tdistancetgeotgeo'; +TCONTAINSTCBUFFERTCBUFFER: 'TCONTAINSTCBUFFERTCBUFFER' | 'tcontainstcbuffertcbuffer'; +TCOVERSTCBUFFERTCBUFFER: 'TCOVERSTCBUFFERTCBUFFER' | 'tcoverstcbuffertcbuffer'; +TDISTANCETCBUFFERTCBUFFER: 'TDISTANCETCBUFFERTCBUFFER' | 'tdistancetcbuffertcbuffer'; +TDISTANCETNPOINTTNPOINT: 'TDISTANCETNPOINTTNPOINT' | 'tdistancetnpointtnpoint'; +TDISTANCETPOSETPOSE: 'TDISTANCETPOSETPOSE' | 'tdistancetposetpose'; +TPOINT_LENGTH_WKB: 'TPOINT_LENGTH_WKB' | 'tpoint_length_wkb'; +TNPOINT_LENGTH: 'TNPOINT_LENGTH' | 'tnpoint_length'; +TCBUFFER_TO_TFLOAT: 'TCBUFFER_TO_TFLOAT' | 'tcbuffer_to_tfloat'; +NAD_TCBUFFER_STBOX: 'NAD_TCBUFFER_STBOX' | 'nad_tcbuffer_stbox'; +NAD_TNPOINT_STBOX: 'NAD_TNPOINT_STBOX' | 'nad_tnpoint_stbox'; +NAD_TPOSE_STBOX: 'NAD_TPOSE_STBOX' | 'nad_tpose_stbox'; +ATOUCHESTPOINTGEO: 'ATOUCHESTPOINTGEO' | 'atouchestpointgeo'; +ETOUCHESTPOINTGEO: 'ETOUCHESTPOINTGEO' | 'etouchestpointgeo'; +TEMPORALACONTAINSGEOMETRY: 'TEMPORALACONTAINSGEOMETRY' | 'temporalacontainsgeometry'; +TEMPORALADISJOINTGEOMETRY: 'TEMPORALADISJOINTGEOMETRY' | 'temporaladisjointgeometry'; +TEMPORALAINTERSECTSGEOMETRY: 'TEMPORALAINTERSECTSGEOMETRY' | 'temporalaintersectsgeometry'; +TEMPORALATOUCHESGEOMETRY: 'TEMPORALATOUCHESGEOMETRY' | 'temporalatouchesgeometry'; +TEMPORALECONTAINSGEOMETRY: 'TEMPORALECONTAINSGEOMETRY' | 'temporalecontainsgeometry'; +TEMPORALECOVERSGEOMETRY: 'TEMPORALECOVERSGEOMETRY' | 'temporalecoversgeometry'; +TEMPORALEDISJOINTGEOMETRY: 'TEMPORALEDISJOINTGEOMETRY' | 'temporaledisjointgeometry'; +TEMPORALEINTERSECTSGEOMETRY: 'TEMPORALEINTERSECTSGEOMETRY' | 'temporaleintersectsgeometry'; +TEMPORALETOUCHESGEOMETRY: 'TEMPORALETOUCHESGEOMETRY' | 'temporaletouchesgeometry'; +TEMPORALINTERSECTSGEOMETRY: 'TEMPORALINTERSECTSGEOMETRY' | 'temporalintersectsgeometry'; +TEMPORALATGEOMETRY: 'TEMPORALATGEOMETRY' | 'temporalatgeometry'; +TEMPORALMINUSGEOMETRY: 'TEMPORALMINUSGEOMETRY' | 'temporalminusgeometry'; +TEMPORALADWITHINGEOMETRY: 'TEMPORALADWITHINGEOMETRY' | 'temporaladwithingeometry'; +TEMPORALEDWITHINGEOMETRY: 'TEMPORALEDWITHINGEOMETRY' | 'temporaledwithingeometry'; +TEMPORALADWITHINTGEOMETRY: 'TEMPORALADWITHINTGEOMETRY' | 'temporaladwithintgeometry'; +TEMPORALEDWITHINTGEOMETRY: 'TEMPORALEDWITHINTGEOMETRY' | 'temporaledwithintgeometry'; +TEMPORALACONTAINSTGEOMETRY: 'TEMPORALACONTAINSTGEOMETRY' | 'temporalacontainstgeometry'; +TEMPORALADISJOINTTGEOMETRY: 'TEMPORALADISJOINTTGEOMETRY' | 'temporaladisjointtgeometry'; +TEMPORALAINTERSECTSTGEOMETRY: 'TEMPORALAINTERSECTSTGEOMETRY' | 'temporalaintersectstgeometry'; +TEMPORALATOUCHESTGEOMETRY: 'TEMPORALATOUCHESTGEOMETRY' | 'temporalatouchestgeometry'; +TEMPORALECONTAINSTGEOMETRY: 'TEMPORALECONTAINSTGEOMETRY' | 'temporalecontainstgeometry'; +TEMPORALECOVERSTGEOMETRY: 'TEMPORALECOVERSTGEOMETRY' | 'temporalecoverstgeometry'; +TEMPORALEDISJOINTTGEOMETRY: 'TEMPORALEDISJOINTTGEOMETRY' | 'temporaledisjointtgeometry'; +TEMPORALEINTERSECTSTGEOMETRY: 'TEMPORALEINTERSECTSTGEOMETRY' | 'temporaleintersectstgeometry'; +TEMPORALETOUCHESTGEOMETRY: 'TEMPORALETOUCHESTGEOMETRY' | 'temporaletouchestgeometry'; +TEMPORAL_NAD_GEOMETRY: 'TEMPORAL_NAD_GEOMETRY' | 'temporal_nad_geometry'; +TEMPORALACONTAINSTCBUFFER: 'TEMPORALACONTAINSTCBUFFER' | 'temporalacontainstcbuffer'; +TEMPORALACOVERSTCBUFFER: 'TEMPORALACOVERSTCBUFFER' | 'temporalacoverstcbuffer'; +TEMPORALADISJOINTTCBUFFER: 'TEMPORALADISJOINTTCBUFFER' | 'temporaladisjointtcbuffer'; +TEMPORALAINTERSECTSTCBUFFER: 'TEMPORALAINTERSECTSTCBUFFER' | 'temporalaintersectstcbuffer'; +TEMPORALATOUCHESTCBUFFER: 'TEMPORALATOUCHESTCBUFFER' | 'temporalatouchestcbuffer'; +TEMPORALECONTAINSTCBUFFER: 'TEMPORALECONTAINSTCBUFFER' | 'temporalecontainstcbuffer'; +TEMPORALECOVERSTCBUFFER: 'TEMPORALECOVERSTCBUFFER' | 'temporalecoverstcbuffer'; +TEMPORALEDISJOINTTCBUFFER: 'TEMPORALEDISJOINTTCBUFFER' | 'temporaledisjointtcbuffer'; +TEMPORALEINTERSECTSTCBUFFER: 'TEMPORALEINTERSECTSTCBUFFER' | 'temporaleintersectstcbuffer'; +TEMPORALETOUCHESTCBUFFER: 'TEMPORALETOUCHESTCBUFFER' | 'temporaletouchestcbuffer'; +TEMPORAL_NAD_TCBUFFER: 'TEMPORAL_NAD_TCBUFFER' | 'temporal_nad_tcbuffer'; +TEMPORALADWITHINTCBUFFERGEOMETRY: 'TEMPORALADWITHINTCBUFFERGEOMETRY' | 'temporaladwithintcbuffergeometry'; +TEMPORALEDWITHINTCBUFFERGEOMETRY: 'TEMPORALEDWITHINTCBUFFERGEOMETRY' | 'temporaledwithintcbuffergeometry'; +ALWAYSEQTCBUFFERCBUFFER: 'ALWAYSEQTCBUFFERCBUFFER' | 'alwayseqtcbuffercbuffer'; +ALWAYSNETCBUFFERCBUFFER: 'ALWAYSNETCBUFFERCBUFFER' | 'alwaysnetcbuffercbuffer'; +EVEREQTCBUFFERCBUFFER: 'EVEREQTCBUFFERCBUFFER' | 'evereqtcbuffercbuffer'; +EVERNETCBUFFERCBUFFER: 'EVERNETCBUFFERCBUFFER' | 'evernetcbuffercbuffer'; +TEMPORALACONTAINSTCBUFFERCBUFFER: 'TEMPORALACONTAINSTCBUFFERCBUFFER' | 'temporalacontainstcbuffercbuffer'; +TEMPORALACOVERSTCBUFFERCBUFFER: 'TEMPORALACOVERSTCBUFFERCBUFFER' | 'temporalacoverstcbuffercbuffer'; +TEMPORALADISJOINTTCBUFFERCBUFFER: 'TEMPORALADISJOINTTCBUFFERCBUFFER' | 'temporaladisjointtcbuffercbuffer'; +TEMPORALAINTERSECTSTCBUFFERCBUFFER: 'TEMPORALAINTERSECTSTCBUFFERCBUFFER' | 'temporalaintersectstcbuffercbuffer'; +TEMPORALATOUCHESTCBUFFERCBUFFER: 'TEMPORALATOUCHESTCBUFFERCBUFFER' | 'temporalatouchestcbuffercbuffer'; +TEMPORALECONTAINSTCBUFFERCBUFFER: 'TEMPORALECONTAINSTCBUFFERCBUFFER' | 'temporalecontainstcbuffercbuffer'; +TEMPORALECOVERSTCBUFFERCBUFFER: 'TEMPORALECOVERSTCBUFFERCBUFFER' | 'temporalecoverstcbuffercbuffer'; +TEMPORALEDISJOINTTCBUFFERCBUFFER: 'TEMPORALEDISJOINTTCBUFFERCBUFFER' | 'temporaledisjointtcbuffercbuffer'; +TEMPORALEINTERSECTSTCBUFFERCBUFFER: 'TEMPORALEINTERSECTSTCBUFFERCBUFFER' | 'temporaleintersectstcbuffercbuffer'; +TEMPORALETOUCHESTCBUFFERCBUFFER: 'TEMPORALETOUCHESTCBUFFERCBUFFER' | 'temporaletouchestcbuffercbuffer'; +TEMPORAL_NAD_TCBUFFER_CBUFFER: 'TEMPORAL_NAD_TCBUFFER_CBUFFER' | 'temporal_nad_tcbuffer_cbuffer'; +TEMPORALADWITHINTCBUFFERCBUFFER: 'TEMPORALADWITHINTCBUFFERCBUFFER' | 'temporaladwithintcbuffercbuffer'; +TEMPORALEDWITHINTCBUFFERCBUFFER: 'TEMPORALEDWITHINTCBUFFERCBUFFER' | 'temporaledwithintcbuffercbuffer'; +TEMPORALADISJOINTTCBUFFERTCBUFFER: 'TEMPORALADISJOINTTCBUFFERTCBUFFER' | 'temporaladisjointtcbuffertcbuffer'; +TEMPORALAINTERSECTSTCBUFFERTCBUFFER: 'TEMPORALAINTERSECTSTCBUFFERTCBUFFER' | 'temporalaintersectstcbuffertcbuffer'; +TEMPORALATOUCHESTCBUFFERTCBUFFER: 'TEMPORALATOUCHESTCBUFFERTCBUFFER' | 'temporalatouchestcbuffertcbuffer'; +TEMPORALECOVERSTCBUFFERTCBUFFER: 'TEMPORALECOVERSTCBUFFERTCBUFFER' | 'temporalecoverstcbuffertcbuffer'; +TEMPORAL_NAD_TCBUFFER_TCBUFFER: 'TEMPORAL_NAD_TCBUFFER_TCBUFFER' | 'temporal_nad_tcbuffer_tcbuffer'; +TEMPORALADWITHINTCBUFFERTCBUFFER: 'TEMPORALADWITHINTCBUFFERTCBUFFER' | 'temporaladwithintcbuffertcbuffer'; +TEMPORALEDWITHINTCBUFFERTCBUFFER: 'TEMPORALEDWITHINTCBUFFERTCBUFFER' | 'temporaledwithintcbuffertcbuffer'; +TEMPORAL_AT_STBOX: 'TEMPORAL_AT_STBOX' | 'temporal_at_stbox'; +TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER: 'TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER' | 'temporal_eintersects_tcbuffer_tcbuffer'; +TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER: 'TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER' | 'temporal_etouches_tcbuffer_tcbuffer'; +/* END CODEGEN LEXER TOKENS */ WATERMARK: 'WATERMARK' | 'watermark'; OFFSET: 'OFFSET' | 'offset'; LOCALHOST: 'LOCALHOST' | 'localhost'; diff --git a/nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp b/nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp index 4e9f1d7642..c0fed0910b 100644 --- a/nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp +++ b/nes-sql-parser/src/AntlrSQLQueryPlanCreator.cpp @@ -69,6 +69,771 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -1188,6 +1953,21138 @@ void AntlrSQLQueryPlanCreator::exitFunctionCall(AntlrSQLParser::FunctionCallCont } break; + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_CEIL */ + case AntlrSQLLexer::TFLOAT_CEIL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_CEIL requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatCeilLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_CEIL */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_EXP */ + case AntlrSQLLexer::TFLOAT_EXP: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_EXP requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatExpLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_EXP */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_FLOOR */ + case AntlrSQLLexer::TFLOAT_FLOOR: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_FLOOR requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatFloorLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_FLOOR */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_LN */ + case AntlrSQLLexer::TFLOAT_LN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_LN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatLnLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_LN */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_LOG10 */ + case AntlrSQLLexer::TFLOAT_LOG10: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_LOG10 requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatLog10LogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_LOG10 */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_RADIANS */ + case AntlrSQLLexer::TFLOAT_RADIANS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_RADIANS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatRadiansLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_RADIANS */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_TO_TINT */ + case AntlrSQLLexer::TFLOAT_TO_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_TO_TINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatToTintLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_TO_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TINT_TO_TFLOAT */ + case AntlrSQLLexer::TINT_TO_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TINT_TO_TFLOAT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TintToTfloatLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TINT_TO_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_TFLOAT_FLOAT */ + case AntlrSQLLexer::ADD_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADD_TFLOAT_FLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_TFLOAT_FLOAT */ + case AntlrSQLLexer::SUB_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SUB_TFLOAT_FLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_TFLOAT_FLOAT */ + case AntlrSQLLexer::MUL_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("MUL_TFLOAT_FLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_TFLOAT_FLOAT */ + case AntlrSQLLexer::DIV_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("DIV_TFLOAT_FLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_TINT_INT */ + case AntlrSQLLexer::ADD_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADD_TINT_INT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_TINT_INT */ + case AntlrSQLLexer::SUB_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SUB_TINT_INT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_TINT_INT */ + case AntlrSQLLexer::MUL_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("MUL_TINT_INT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_TINT_INT */ + case AntlrSQLLexer::DIV_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("DIV_TINT_INT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_FLOAT_TFLOAT */ + case AntlrSQLLexer::ADD_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADD_FLOAT_TFLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_FLOAT_TFLOAT */ + case AntlrSQLLexer::SUB_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SUB_FLOAT_TFLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_FLOAT_TFLOAT */ + case AntlrSQLLexer::MUL_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("MUL_FLOAT_TFLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_FLOAT_TFLOAT */ + case AntlrSQLLexer::DIV_FLOAT_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("DIV_FLOAT_TFLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivFloatTfloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_FLOAT_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_INT_TINT */ + case AntlrSQLLexer::ADD_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADD_INT_TINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_INT_TINT */ + case AntlrSQLLexer::SUB_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SUB_INT_TINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_INT_TINT */ + case AntlrSQLLexer::MUL_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("MUL_INT_TINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_INT_TINT */ + case AntlrSQLLexer::DIV_INT_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("DIV_INT_TINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivIntTintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_INT_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_TBIGINT_BIGINT */ + case AntlrSQLLexer::ADD_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADD_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_TBIGINT_BIGINT */ + case AntlrSQLLexer::SUB_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SUB_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_TBIGINT_BIGINT */ + case AntlrSQLLexer::MUL_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("MUL_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_TBIGINT_BIGINT */ + case AntlrSQLLexer::DIV_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("DIV_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_BIGINT_TBIGINT */ + case AntlrSQLLexer::ADD_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADD_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_BIGINT_TBIGINT */ + case AntlrSQLLexer::SUB_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SUB_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_BIGINT_TBIGINT */ + case AntlrSQLLexer::MUL_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("MUL_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_BIGINT_TBIGINT */ + case AntlrSQLLexer::DIV_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("DIV_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ADD_TNUMBER_TNUMBER */ + case AntlrSQLLexer::ADD_TNUMBER_TNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("ADD_TNUMBER_TNUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AddTnumberTnumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: ADD_TNUMBER_TNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: SUB_TNUMBER_TNUMBER */ + case AntlrSQLLexer::SUB_TNUMBER_TNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("SUB_TNUMBER_TNUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(SubTnumberTnumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: SUB_TNUMBER_TNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: MUL_TNUMBER_TNUMBER */ + case AntlrSQLLexer::MUL_TNUMBER_TNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("MUL_TNUMBER_TNUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MulTnumberTnumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: MUL_TNUMBER_TNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: DIV_TNUMBER_TNUMBER */ + case AntlrSQLLexer::DIV_TNUMBER_TNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("DIV_TNUMBER_TNUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(DivTnumberTnumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: DIV_TNUMBER_TNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_SHIFT_VALUE */ + case AntlrSQLLexer::TFLOAT_SHIFT_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TFLOAT_SHIFT_VALUE requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatShiftValueLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_SHIFT_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_SCALE_VALUE */ + case AntlrSQLLexer::TFLOAT_SCALE_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TFLOAT_SCALE_VALUE requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatScaleValueLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_SCALE_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_SHIFT_SCALE_VALUE */ + case AntlrSQLLexer::TFLOAT_SHIFT_SCALE_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TFLOAT_SHIFT_SCALE_VALUE requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatShiftScaleValueLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_SHIFT_SCALE_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TINT_SHIFT_VALUE */ + case AntlrSQLLexer::TINT_SHIFT_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TINT_SHIFT_VALUE requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TintShiftValueLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TINT_SHIFT_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TINT_SCALE_VALUE */ + case AntlrSQLLexer::TINT_SCALE_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TINT_SCALE_VALUE requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TintScaleValueLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TINT_SCALE_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TINT_SHIFT_SCALE_VALUE */ + case AntlrSQLLexer::TINT_SHIFT_SCALE_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TINT_SHIFT_SCALE_VALUE requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TintShiftScaleValueLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TINT_SHIFT_SCALE_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TBIGINT_SHIFT_VALUE */ + case AntlrSQLLexer::TBIGINT_SHIFT_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TBIGINT_SHIFT_VALUE requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TbigintShiftValueLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TBIGINT_SHIFT_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TBIGINT_SCALE_VALUE */ + case AntlrSQLLexer::TBIGINT_SCALE_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TBIGINT_SCALE_VALUE requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TbigintScaleValueLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TBIGINT_SCALE_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TBIGINT_SHIFT_SCALE_VALUE */ + case AntlrSQLLexer::TBIGINT_SHIFT_SCALE_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TBIGINT_SHIFT_SCALE_VALUE requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TbigintShiftScaleValueLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TBIGINT_SHIFT_SCALE_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCE_TFLOAT_FLOAT */ + case AntlrSQLLexer::TDISTANCE_TFLOAT_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TDISTANCE_TFLOAT_FLOAT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTfloatFloatLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCE_TFLOAT_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCE_TINT_INT */ + case AntlrSQLLexer::TDISTANCE_TINT_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TDISTANCE_TINT_INT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTintIntLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCE_TINT_INT */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCE_TNUMBER_TNUMBER */ + case AntlrSQLLexer::TDISTANCE_TNUMBER_TNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TDISTANCE_TNUMBER_TNUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTnumberTnumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCE_TNUMBER_TNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ROUND */ + case AntlrSQLLexer::TEMPORAL_ROUND: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEMPORAL_ROUND requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TemporalRoundLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ROUND */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_TBIGINT_BIGINT */ + case AntlrSQLLexer::EVER_EQ_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_EQ_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_TBIGINT_BIGINT */ + case AntlrSQLLexer::EVER_NE_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_NE_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_LT_TBIGINT_BIGINT */ + case AntlrSQLLexer::EVER_LT_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_LT_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLtTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_LT_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_LE_TBIGINT_BIGINT */ + case AntlrSQLLexer::EVER_LE_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_LE_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLeTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_LE_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_GT_TBIGINT_BIGINT */ + case AntlrSQLLexer::EVER_GT_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_GT_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGtTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_GT_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_GE_TBIGINT_BIGINT */ + case AntlrSQLLexer::EVER_GE_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_GE_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGeTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_GE_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_TBIGINT_BIGINT */ + case AntlrSQLLexer::ALWAYS_EQ_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_EQ_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_TBIGINT_BIGINT */ + case AntlrSQLLexer::ALWAYS_NE_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_NE_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_LT_TBIGINT_BIGINT */ + case AntlrSQLLexer::ALWAYS_LT_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_LT_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLtTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_LT_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_LE_TBIGINT_BIGINT */ + case AntlrSQLLexer::ALWAYS_LE_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_LE_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLeTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_LE_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_GT_TBIGINT_BIGINT */ + case AntlrSQLLexer::ALWAYS_GT_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_GT_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGtTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_GT_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_GE_TBIGINT_BIGINT */ + case AntlrSQLLexer::ALWAYS_GE_TBIGINT_BIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_GE_TBIGINT_BIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGeTbigintBigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_GE_TBIGINT_BIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_BIGINT_TBIGINT */ + case AntlrSQLLexer::EVER_EQ_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_EQ_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_BIGINT_TBIGINT */ + case AntlrSQLLexer::EVER_NE_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_NE_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_LT_BIGINT_TBIGINT */ + case AntlrSQLLexer::EVER_LT_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_LT_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLtBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_LT_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_LE_BIGINT_TBIGINT */ + case AntlrSQLLexer::EVER_LE_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_LE_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLeBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_LE_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_GT_BIGINT_TBIGINT */ + case AntlrSQLLexer::EVER_GT_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_GT_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGtBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_GT_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_GE_BIGINT_TBIGINT */ + case AntlrSQLLexer::EVER_GE_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_GE_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGeBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_GE_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_BIGINT_TBIGINT */ + case AntlrSQLLexer::ALWAYS_EQ_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_EQ_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_BIGINT_TBIGINT */ + case AntlrSQLLexer::ALWAYS_NE_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_NE_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_LT_BIGINT_TBIGINT */ + case AntlrSQLLexer::ALWAYS_LT_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_LT_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLtBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_LT_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_LE_BIGINT_TBIGINT */ + case AntlrSQLLexer::ALWAYS_LE_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_LE_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLeBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_LE_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_GT_BIGINT_TBIGINT */ + case AntlrSQLLexer::ALWAYS_GT_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_GT_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGtBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_GT_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_GE_BIGINT_TBIGINT */ + case AntlrSQLLexer::ALWAYS_GE_BIGINT_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_GE_BIGINT_TBIGINT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGeBigintTbigintLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_GE_BIGINT_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_TBOOL_BOOL */ + case AntlrSQLLexer::EVER_EQ_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_EQ_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_TBOOL_BOOL */ + case AntlrSQLLexer::EVER_NE_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_NE_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_TBOOL_BOOL */ + case AntlrSQLLexer::ALWAYS_EQ_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_EQ_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_TBOOL_BOOL */ + case AntlrSQLLexer::ALWAYS_NE_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_NE_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_BOOL_TBOOL */ + case AntlrSQLLexer::EVER_EQ_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_EQ_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_BOOL_TBOOL */ + case AntlrSQLLexer::EVER_NE_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVER_NE_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_BOOL_TBOOL */ + case AntlrSQLLexer::ALWAYS_EQ_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_EQ_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_BOOL_TBOOL */ + case AntlrSQLLexer::ALWAYS_NE_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYS_NE_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TBIGINT_TO_TINT */ + case AntlrSQLLexer::TBIGINT_TO_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TBIGINT_TO_TINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TbigintToTintLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TBIGINT_TO_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TBIGINT_TO_TFLOAT */ + case AntlrSQLLexer::TBIGINT_TO_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TBIGINT_TO_TFLOAT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TbigintToTfloatLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TBIGINT_TO_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TINT_TO_TBIGINT */ + case AntlrSQLLexer::TINT_TO_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TINT_TO_TBIGINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TintToTbigintLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TINT_TO_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: TFLOAT_TO_TBIGINT */ + case AntlrSQLLexer::TFLOAT_TO_TBIGINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TFLOAT_TO_TBIGINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TfloatToTbigintLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TFLOAT_TO_TBIGINT */ + + /* BEGIN CODEGEN PARSER GLUE: TBOOL_TO_TINT */ + case AntlrSQLLexer::TBOOL_TO_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TBOOL_TO_TINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TboolToTintLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TBOOL_TO_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: TNOT_TBOOL */ + case AntlrSQLLexer::TNOT_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TNOT_TBOOL requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TnotTboolLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TNOT_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TAND_TBOOL_BOOL */ + case AntlrSQLLexer::TAND_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TAND_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TandTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TAND_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TOR_TBOOL_BOOL */ + case AntlrSQLLexer::TOR_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TOR_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TorTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TOR_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_TBOOL_BOOL */ + case AntlrSQLLexer::TEQ_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TeqTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_TBOOL_BOOL */ + case AntlrSQLLexer::TNE_TBOOL_BOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_TBOOL_BOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TneTboolBoolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_TBOOL_BOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TAND_BOOL_TBOOL */ + case AntlrSQLLexer::TAND_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TAND_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TandBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TAND_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TOR_BOOL_TBOOL */ + case AntlrSQLLexer::TOR_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TOR_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TorBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TOR_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_BOOL_TBOOL */ + case AntlrSQLLexer::TEQ_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TeqBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_BOOL_TBOOL */ + case AntlrSQLLexer::TNE_BOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_BOOL_TBOOL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TneBoolTboolLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_BOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TAND_TBOOL_TBOOL */ + case AntlrSQLLexer::TAND_TBOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TAND_TBOOL_TBOOL requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TandTboolTboolLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TAND_TBOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: TOR_TBOOL_TBOOL */ + case AntlrSQLLexer::TOR_TBOOL_TBOOL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TOR_TBOOL_TBOOL requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TorTboolTboolLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TOR_TBOOL_TBOOL */ + + /* BEGIN CODEGEN PARSER GLUE: ECOVERS_TGEO_GEO */ + case AntlrSQLLexer::ECOVERS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ECOVERS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcoversTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECOVERS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TGEO_GEO */ + case AntlrSQLLexer::EDISJOINT_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EDISJOINT_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdisjointTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TGEO_TGEO */ + case AntlrSQLLexer::NAD_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("NAD_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ECONTAINS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ECONTAINS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcontainsTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ACONTAINS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ACONTAINS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcontainsTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::EDISJOINT_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EDISJOINT_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdisjointTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EDWITHIN_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::EDWITHIN_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EDWITHIN_TCBUFFER_CBUFFER requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdwithinTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: EDWITHIN_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ADWITHIN_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::ADWITHIN_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ADWITHIN_TCBUFFER_CBUFFER requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdwithinTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: ADWITHIN_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ACONTAINS_TGEO_GEO */ + case AntlrSQLLexer::ACONTAINS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ACONTAINS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcontainsTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ACONTAINS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ACOVERS_TGEO_GEO */ + case AntlrSQLLexer::ACOVERS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ACOVERS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcoversTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ACOVERS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ADISJOINT_TGEO_GEO */ + case AntlrSQLLexer::ADISJOINT_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ADISJOINT_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdisjointTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ADISJOINT_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: AINTERSECTS_TGEO_GEO */ + case AntlrSQLLexer::AINTERSECTS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("AINTERSECTS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AintersectsTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: AINTERSECTS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ATOUCHES_TGEO_GEO */ + case AntlrSQLLexer::ATOUCHES_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ATOUCHES_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AtouchesTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ATOUCHES_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECONTAINS_TGEO_GEO */ + case AntlrSQLLexer::ECONTAINS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ECONTAINS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcontainsTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECONTAINS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECOVERS_TGEO_GEO */ + case AntlrSQLLexer::ECOVERS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ECOVERS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcoversTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECOVERS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TGEO_GEO */ + case AntlrSQLLexer::EDISJOINT_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EDISJOINT_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdisjointTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EINTERSECTS_TGEO_GEO */ + case AntlrSQLLexer::EINTERSECTS_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EINTERSECTS_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EintersectsTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EINTERSECTS_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ETOUCHES_TGEO_GEO */ + case AntlrSQLLexer::ETOUCHES_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ETOUCHES_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EtouchesTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ETOUCHES_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_TGEO_GEO */ + case AntlrSQLLexer::EVER_EQ_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EVER_EQ_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_TGEO_GEO */ + case AntlrSQLLexer::EVER_NE_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EVER_NE_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_TGEO_GEO */ + case AntlrSQLLexer::ALWAYS_EQ_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ALWAYS_EQ_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_TGEO_GEO */ + case AntlrSQLLexer::ALWAYS_NE_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ALWAYS_NE_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TGEO_GEO */ + case AntlrSQLLexer::NAD_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("NAD_TGEO_GEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTgeoGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ADWITHIN_TGEO_GEO */ + case AntlrSQLLexer::ADWITHIN_TGEO_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ADWITHIN_TGEO_GEO requires exactly 5 arguments (lon, lat, timestamp, geometry, distance), but got {}", argCount); + + /* Lift constants (geometry + distance) — same shape as EDWITHIN_TGEO_GEO */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + const auto upperValue = Util::toUpperCase(constantValue); + if (upperValue == "TRUE" || upperValue == "FALSE") + { + dataType = DataTypeProvider::provideDataType(DataType::Type::BOOLEAN); + } + else + { + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + } + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + /* After lift: [lon, lat, ts, distance, geometry] (geometry pushed last because lifted last in LIFO) */ + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdwithinTgeoGeoLogicalFunction(lon, lat, timestamp, geometry, dist)); + } + break; + /* END CODEGEN PARSER GLUE: ADWITHIN_TGEO_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ACONTAINS_TGEO_TGEO */ + case AntlrSQLLexer::ACONTAINS_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ACONTAINS_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcontainsTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ACONTAINS_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ACOVERS_TGEO_TGEO */ + case AntlrSQLLexer::ACOVERS_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ACOVERS_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcoversTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ACOVERS_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ADISJOINT_TGEO_TGEO */ + case AntlrSQLLexer::ADISJOINT_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ADISJOINT_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdisjointTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ADISJOINT_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: AINTERSECTS_TGEO_TGEO */ + case AntlrSQLLexer::AINTERSECTS_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("AINTERSECTS_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AintersectsTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: AINTERSECTS_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ATOUCHES_TGEO_TGEO */ + case AntlrSQLLexer::ATOUCHES_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ATOUCHES_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AtouchesTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ATOUCHES_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECONTAINS_TGEO_TGEO */ + case AntlrSQLLexer::ECONTAINS_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ECONTAINS_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcontainsTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ECONTAINS_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECOVERS_TGEO_TGEO */ + case AntlrSQLLexer::ECOVERS_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ECOVERS_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcoversTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ECOVERS_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TGEO_TGEO */ + case AntlrSQLLexer::EDISJOINT_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EDISJOINT_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdisjointTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: EINTERSECTS_TGEO_TGEO */ + case AntlrSQLLexer::EINTERSECTS_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EINTERSECTS_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EintersectsTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EINTERSECTS_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ETOUCHES_TGEO_TGEO */ + case AntlrSQLLexer::ETOUCHES_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ETOUCHES_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EtouchesTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ETOUCHES_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_TGEO_TGEO */ + case AntlrSQLLexer::EVER_EQ_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVER_EQ_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_TGEO_TGEO */ + case AntlrSQLLexer::EVER_NE_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVER_NE_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_TGEO_TGEO */ + case AntlrSQLLexer::ALWAYS_EQ_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYS_EQ_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_TGEO_TGEO */ + case AntlrSQLLexer::ALWAYS_NE_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYS_NE_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TGEO_TGEO */ + case AntlrSQLLexer::NAD_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("NAD_TGEO_TGEO requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: EDWITHIN_TGEO_TGEO */ + case AntlrSQLLexer::EDWITHIN_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("EDWITHIN_TGEO_TGEO requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdwithinTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: EDWITHIN_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ADWITHIN_TGEO_TGEO */ + case AntlrSQLLexer::ADWITHIN_TGEO_TGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("ADWITHIN_TGEO_TGEO requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdwithinTgeoTgeoLogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: ADWITHIN_TGEO_TGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_GEO */ + case AntlrSQLLexer::ACONTAINS_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ACONTAINS_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcontainsTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ACOVERS_TCBUFFER_GEO */ + case AntlrSQLLexer::ACOVERS_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ACOVERS_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcoversTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ACOVERS_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ADISJOINT_TCBUFFER_GEO */ + case AntlrSQLLexer::ADISJOINT_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ADISJOINT_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdisjointTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ADISJOINT_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: AINTERSECTS_TCBUFFER_GEO */ + case AntlrSQLLexer::AINTERSECTS_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("AINTERSECTS_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AintersectsTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: AINTERSECTS_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ATOUCHES_TCBUFFER_GEO */ + case AntlrSQLLexer::ATOUCHES_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ATOUCHES_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AtouchesTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ATOUCHES_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_GEO */ + case AntlrSQLLexer::ECONTAINS_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ECONTAINS_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcontainsTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ECOVERS_TCBUFFER_GEO */ + case AntlrSQLLexer::ECOVERS_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ECOVERS_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcoversTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ECOVERS_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_GEO */ + case AntlrSQLLexer::EDISJOINT_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EDISJOINT_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdisjointTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EINTERSECTS_TCBUFFER_GEO */ + case AntlrSQLLexer::EINTERSECTS_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EINTERSECTS_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EintersectsTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EINTERSECTS_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ETOUCHES_TCBUFFER_GEO */ + case AntlrSQLLexer::ETOUCHES_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ETOUCHES_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EtouchesTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ETOUCHES_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TCBUFFER_GEO */ + case AntlrSQLLexer::NAD_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("NAD_TCBUFFER_GEO requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EDWITHIN_TCBUFFER_GEO */ + case AntlrSQLLexer::EDWITHIN_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EDWITHIN_TCBUFFER_GEO requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdwithinTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: EDWITHIN_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ADWITHIN_TCBUFFER_GEO */ + case AntlrSQLLexer::ADWITHIN_TCBUFFER_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ADWITHIN_TCBUFFER_GEO requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdwithinTcbufferGeoLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: ADWITHIN_TCBUFFER_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ACONTAINS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ACONTAINS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcontainsTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ACONTAINS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ACOVERS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ACOVERS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ACOVERS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AcoversTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ACOVERS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ADISJOINT_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ADISJOINT_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ADISJOINT_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdisjointTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ADISJOINT_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: AINTERSECTS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::AINTERSECTS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("AINTERSECTS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AintersectsTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: AINTERSECTS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ATOUCHES_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ATOUCHES_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ATOUCHES_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AtouchesTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ATOUCHES_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ECONTAINS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ECONTAINS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcontainsTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ECONTAINS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ECOVERS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ECOVERS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ECOVERS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EcoversTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ECOVERS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::EDISJOINT_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EDISJOINT_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdisjointTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EDISJOINT_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EINTERSECTS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::EINTERSECTS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EINTERSECTS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EintersectsTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EINTERSECTS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ETOUCHES_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ETOUCHES_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ETOUCHES_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EtouchesTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ETOUCHES_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_EQ_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::EVER_EQ_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EVER_EQ_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_EQ_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EVER_NE_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::EVER_NE_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EVER_NE_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVER_NE_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_EQ_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ALWAYS_EQ_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ALWAYS_EQ_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYS_NE_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ALWAYS_NE_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ALWAYS_NE_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::NAD_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("NAD_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EDWITHIN_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::EDWITHIN_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("EDWITHIN_TCBUFFER_TCBUFFER requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EdwithinTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: EDWITHIN_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ADWITHIN_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::ADWITHIN_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("ADWITHIN_TCBUFFER_TCBUFFER requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdwithinTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: ADWITHIN_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: MINDISTANCE_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::MINDISTANCE_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("MINDISTANCE_TCBUFFER_TCBUFFER requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + MindistanceTcbufferTcbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: MINDISTANCE_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_EQ */ + case AntlrSQLLexer::H3INDEX_EQ: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_EQ requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexEqLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_EQ */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_NE */ + case AntlrSQLLexer::H3INDEX_NE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_NE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexNeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_NE */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_LT */ + case AntlrSQLLexer::H3INDEX_LT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_LT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexLtLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_LT */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_LE */ + case AntlrSQLLexer::H3INDEX_LE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_LE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexLeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_LE */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_GT */ + case AntlrSQLLexer::H3INDEX_GT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_GT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexGtLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_GT */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_GE */ + case AntlrSQLLexer::H3INDEX_GE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_GE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexGeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_GE */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_CMP */ + case AntlrSQLLexer::H3INDEX_CMP: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("H3INDEX_CMP requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexCmpLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_CMP */ + + /* BEGIN CODEGEN PARSER GLUE: H3INDEX_OUT */ + case AntlrSQLLexer::H3INDEX_OUT: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("H3INDEX_OUT requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(H3indexOutLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: H3INDEX_OUT */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_GET_RESOLUTION */ + case AntlrSQLLexer::TH3INDEX_GET_RESOLUTION: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TH3INDEX_GET_RESOLUTION requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexGetResolutionLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_GET_RESOLUTION */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_GET_BASE_CELL_NUMBER */ + case AntlrSQLLexer::TH3INDEX_GET_BASE_CELL_NUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TH3INDEX_GET_BASE_CELL_NUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexGetBaseCellNumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_GET_BASE_CELL_NUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_IS_VALID_CELL */ + case AntlrSQLLexer::TH3INDEX_IS_VALID_CELL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TH3INDEX_IS_VALID_CELL requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexIsValidCellLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_IS_VALID_CELL */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_IS_PENTAGON */ + case AntlrSQLLexer::TH3INDEX_IS_PENTAGON: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TH3INDEX_IS_PENTAGON requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexIsPentagonLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_IS_PENTAGON */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_PARENT */ + case AntlrSQLLexer::TH3INDEX_CELL_TO_PARENT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TH3INDEX_CELL_TO_PARENT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexCellToParentLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_PARENT */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_PARENT_NEXT */ + case AntlrSQLLexer::TH3INDEX_CELL_TO_PARENT_NEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TH3INDEX_CELL_TO_PARENT_NEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexCellToParentNextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_PARENT_NEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_CENTER_CHILD */ + case AntlrSQLLexer::TH3INDEX_CELL_TO_CENTER_CHILD: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TH3INDEX_CELL_TO_CENTER_CHILD requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexCellToCenterChildLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_CENTER_CHILD */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_CENTER_CHILD_NEXT */ + case AntlrSQLLexer::TH3INDEX_CELL_TO_CENTER_CHILD_NEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TH3INDEX_CELL_TO_CENTER_CHILD_NEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexCellToCenterChildNextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_CENTER_CHILD_NEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_CHILD_POS */ + case AntlrSQLLexer::TH3INDEX_CELL_TO_CHILD_POS: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TH3INDEX_CELL_TO_CHILD_POS requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexCellToChildPosLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_CELL_TO_CHILD_POS */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_ARE_NEIGHBOR_CELLS */ + case AntlrSQLLexer::TH3INDEX_ARE_NEIGHBOR_CELLS: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TH3INDEX_ARE_NEIGHBOR_CELLS requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexAreNeighborCellsLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_ARE_NEIGHBOR_CELLS */ + + /* BEGIN CODEGEN PARSER GLUE: TH3INDEX_GRID_DISTANCE */ + case AntlrSQLLexer::TH3INDEX_GRID_DISTANCE: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TH3INDEX_GRID_DISTANCE requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(Th3indexGridDistanceLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TH3INDEX_GRID_DISTANCE */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTH3INDEXH3INDEX */ + case AntlrSQLLexer::EVEREQTH3INDEXH3INDEX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTH3INDEXH3INDEX requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTh3indexH3indexLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTH3INDEXH3INDEX */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETH3INDEXH3INDEX */ + case AntlrSQLLexer::EVERNETH3INDEXH3INDEX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETH3INDEXH3INDEX requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTh3indexH3indexLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETH3INDEXH3INDEX */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTH3INDEXH3INDEX */ + case AntlrSQLLexer::ALWAYSEQTH3INDEXH3INDEX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTH3INDEXH3INDEX requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTh3indexH3indexLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTH3INDEXH3INDEX */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETH3INDEXH3INDEX */ + case AntlrSQLLexer::ALWAYSNETH3INDEXH3INDEX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETH3INDEXH3INDEX requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTh3indexH3indexLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETH3INDEXH3INDEX */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_EQ */ + case AntlrSQLLexer::QUADBIN_EQ: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_EQ requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinEqLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_EQ */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_NE */ + case AntlrSQLLexer::QUADBIN_NE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_NE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinNeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_NE */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_LT */ + case AntlrSQLLexer::QUADBIN_LT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_LT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinLtLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_LT */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_LE */ + case AntlrSQLLexer::QUADBIN_LE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_LE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinLeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_LE */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_GT */ + case AntlrSQLLexer::QUADBIN_GT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_GT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinGtLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_GT */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_GE */ + case AntlrSQLLexer::QUADBIN_GE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_GE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinGeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_GE */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_CMP */ + case AntlrSQLLexer::QUADBIN_CMP: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_CMP requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinCmpLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_CMP */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_GET_RESOLUTION */ + case AntlrSQLLexer::QUADBIN_GET_RESOLUTION: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("QUADBIN_GET_RESOLUTION requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinGetResolutionLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_GET_RESOLUTION */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_IS_VALID_CELL */ + case AntlrSQLLexer::QUADBIN_IS_VALID_CELL: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("QUADBIN_IS_VALID_CELL requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinIsValidCellLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_IS_VALID_CELL */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_CELL_AREA */ + case AntlrSQLLexer::QUADBIN_CELL_AREA: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("QUADBIN_CELL_AREA requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinCellAreaLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_CELL_AREA */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_CELL_TO_PARENT */ + case AntlrSQLLexer::QUADBIN_CELL_TO_PARENT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("QUADBIN_CELL_TO_PARENT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinCellToParentLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_CELL_TO_PARENT */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_CELL_TO_QUADKEY */ + case AntlrSQLLexer::QUADBIN_CELL_TO_QUADKEY: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("QUADBIN_CELL_TO_QUADKEY requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinCellToQuadkeyLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_CELL_TO_QUADKEY */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_POINT_TO_CELL */ + case AntlrSQLLexer::QUADBIN_POINT_TO_CELL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("QUADBIN_POINT_TO_CELL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinPointToCellLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_POINT_TO_CELL */ + + /* BEGIN CODEGEN PARSER GLUE: QUADBIN_TILE_TO_CELL */ + case AntlrSQLLexer::QUADBIN_TILE_TO_CELL: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("QUADBIN_TILE_TO_CELL requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(QuadbinTileToCellLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: QUADBIN_TILE_TO_CELL */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTQUADBINQUADBIN */ + case AntlrSQLLexer::EVEREQTQUADBINQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTQUADBINQUADBIN requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTquadbinQuadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTQUADBINQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETQUADBINQUADBIN */ + case AntlrSQLLexer::EVERNETQUADBINQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETQUADBINQUADBIN requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTquadbinQuadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETQUADBINQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTQUADBINQUADBIN */ + case AntlrSQLLexer::ALWAYSEQTQUADBINQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTQUADBINQUADBIN requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTquadbinQuadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTQUADBINQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETQUADBINQUADBIN */ + case AntlrSQLLexer::ALWAYSNETQUADBINQUADBIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETQUADBINQUADBIN requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTquadbinQuadbinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETQUADBINQUADBIN */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTTEXTTEXT */ + case AntlrSQLLexer::EVEREQTTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTEXTTTEXT */ + case AntlrSQLLexer::EVEREQTEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETTEXTTEXT */ + case AntlrSQLLexer::EVERNETTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETEXTTTEXT */ + case AntlrSQLLexer::EVERNETEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGETTEXTTEXT */ + case AntlrSQLLexer::EVERGETTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGETTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGETTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGETEXTTTEXT */ + case AntlrSQLLexer::EVERGETEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGETEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGETEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTTTEXTTEXT */ + case AntlrSQLLexer::EVERGTTTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGTTTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGtTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTTTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTTEXTTTEXT */ + case AntlrSQLLexer::EVERGTTEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGTTEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverGtTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTTEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLETTEXTTEXT */ + case AntlrSQLLexer::EVERLETTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLETTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLETTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLETEXTTTEXT */ + case AntlrSQLLexer::EVERLETEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLETEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLETEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTTTEXTTEXT */ + case AntlrSQLLexer::EVERLTTTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLTTTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLtTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTTTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTTEXTTTEXT */ + case AntlrSQLLexer::EVERLTTEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLTTEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverLtTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTTEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTTEXTTEXT */ + case AntlrSQLLexer::ALWAYSEQTTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTEXTTTEXT */ + case AntlrSQLLexer::ALWAYSEQTEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETTEXTTEXT */ + case AntlrSQLLexer::ALWAYSNETTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETEXTTTEXT */ + case AntlrSQLLexer::ALWAYSNETEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGETTEXTTEXT */ + case AntlrSQLLexer::ALWAYSGETTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGETTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGETTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGETEXTTTEXT */ + case AntlrSQLLexer::ALWAYSGETEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGETEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGETEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTTTEXTTEXT */ + case AntlrSQLLexer::ALWAYSGTTTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGTTTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGtTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTTTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTTEXTTTEXT */ + case AntlrSQLLexer::ALWAYSGTTEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGTTEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysGtTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTTEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLETTEXTTEXT */ + case AntlrSQLLexer::ALWAYSLETTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLETTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLETTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLETEXTTTEXT */ + case AntlrSQLLexer::ALWAYSLETEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLETEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLETEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTTTEXTTEXT */ + case AntlrSQLLexer::ALWAYSLTTTEXTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLTTTEXTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLtTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTTTEXTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTTEXTTTEXT */ + case AntlrSQLLexer::ALWAYSLTTEXTTTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLTTEXTTTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysLtTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTTEXTTTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_TTEXT_TEXT */ + case AntlrSQLLexer::TEQ_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TEqTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TEQ_TEXT_TTEXT */ + case AntlrSQLLexer::TEQ_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEQ_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TEqTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEQ_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_TTEXT_TEXT */ + case AntlrSQLLexer::TNE_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TNeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TNE_TEXT_TTEXT */ + case AntlrSQLLexer::TNE_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNE_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TNeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNE_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TTEXT_UPPER */ + case AntlrSQLLexer::TTEXT_UPPER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TTEXT_UPPER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TtextUpperLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TTEXT_UPPER */ + + /* BEGIN CODEGEN PARSER GLUE: TTEXT_LOWER */ + case AntlrSQLLexer::TTEXT_LOWER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TTEXT_LOWER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TtextLowerLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TTEXT_LOWER */ + + /* BEGIN CODEGEN PARSER GLUE: TTEXT_INITCAP */ + case AntlrSQLLexer::TTEXT_INITCAP: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TTEXT_INITCAP requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TtextInitcapLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TTEXT_INITCAP */ + + /* BEGIN CODEGEN PARSER GLUE: TEXT_UPPER */ + case AntlrSQLLexer::TEXT_UPPER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("TEXT_UPPER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TextUpperLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: TEXT_UPPER */ + + /* BEGIN CODEGEN PARSER GLUE: TEXT_LOWER */ + case AntlrSQLLexer::TEXT_LOWER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("TEXT_LOWER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TextLowerLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: TEXT_LOWER */ + + /* BEGIN CODEGEN PARSER GLUE: TEXT_INITCAP */ + case AntlrSQLLexer::TEXT_INITCAP: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("TEXT_INITCAP requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TextInitcapLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: TEXT_INITCAP */ + + /* BEGIN CODEGEN PARSER GLUE: TEXTCAT_TTEXT_TEXT */ + case AntlrSQLLexer::TEXTCAT_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEXTCAT_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TextcatTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEXTCAT_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TEXTCAT_TEXT_TTEXT */ + case AntlrSQLLexer::TEXTCAT_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEXTCAT_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TextcatTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TEXTCAT_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TEXTCAT_TTEXT_TTEXT */ + case AntlrSQLLexer::TEXTCAT_TTEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEXTCAT_TTEXT_TTEXT requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TextcatTtextTtextLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TEXTCAT_TTEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_TTEXT_TEXT */ + case AntlrSQLLexer::TGE_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGE_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TGeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TGE_TEXT_TTEXT */ + case AntlrSQLLexer::TGE_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGE_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TGeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGE_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_TTEXT_TEXT */ + case AntlrSQLLexer::TGT_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGT_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TGtTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TGT_TEXT_TTEXT */ + case AntlrSQLLexer::TGT_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TGT_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TGtTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TGT_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_TTEXT_TEXT */ + case AntlrSQLLexer::TLE_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLE_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TLeTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TLE_TEXT_TTEXT */ + case AntlrSQLLexer::TLE_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLE_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TLeTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLE_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_TTEXT_TEXT */ + case AntlrSQLLexer::TLT_TTEXT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLT_TTEXT_TEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TLtTtextTextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_TTEXT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: TLT_TEXT_TTEXT */ + case AntlrSQLLexer::TLT_TEXT_TTEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TLT_TEXT_TTEXT requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TLtTextTtextLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TLT_TEXT_TTEXT */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_EQ */ + case AntlrSQLLexer::JSONB_EQ: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_EQ requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbEqLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_EQ */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_NE */ + case AntlrSQLLexer::JSONB_NE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_NE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbNeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_NE */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_LT */ + case AntlrSQLLexer::JSONB_LT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_LT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbLtLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_LT */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_LE */ + case AntlrSQLLexer::JSONB_LE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_LE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbLeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_LE */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_GT */ + case AntlrSQLLexer::JSONB_GT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_GT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbGtLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_GT */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_GE */ + case AntlrSQLLexer::JSONB_GE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_GE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbGeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_GE */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_CMP */ + case AntlrSQLLexer::JSONB_CMP: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_CMP requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbCmpLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_CMP */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_CONTAINED */ + case AntlrSQLLexer::JSONB_CONTAINED: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_CONTAINED requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbContainedLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_CONTAINED */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_CONTAINS */ + case AntlrSQLLexer::JSONB_CONTAINS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_CONTAINS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbContainsLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_CONTAINS */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_EXISTS */ + case AntlrSQLLexer::JSONB_EXISTS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_EXISTS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbExistsLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_EXISTS */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_ARRAY_LENGTH */ + case AntlrSQLLexer::JSONB_ARRAY_LENGTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("JSONB_ARRAY_LENGTH requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbArrayLengthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_ARRAY_LENGTH */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_TO_CSTRING */ + case AntlrSQLLexer::JSONB_TO_CSTRING: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("JSONB_TO_CSTRING requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbToCstringLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_TO_CSTRING */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_PRETTY */ + case AntlrSQLLexer::JSONB_PRETTY: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("JSONB_PRETTY requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbPrettyLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_PRETTY */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_OBJECT_FIELD_TEXT */ + case AntlrSQLLexer::JSONB_OBJECT_FIELD_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_OBJECT_FIELD_TEXT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbObjectFieldTextLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_OBJECT_FIELD_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: JSONB_ARRAY_ELEMENT_TEXT */ + case AntlrSQLLexer::JSONB_ARRAY_ELEMENT_TEXT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("JSONB_ARRAY_ELEMENT_TEXT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(JsonbArrayElementTextLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: JSONB_ARRAY_ELEMENT_TEXT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTJSONBJSONB */ + case AntlrSQLLexer::EVEREQTJSONBJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTJSONBJSONB requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTjsonbJsonbLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTJSONBJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETJSONBJSONB */ + case AntlrSQLLexer::EVERNETJSONBJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETJSONBJSONB requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTjsonbJsonbLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETJSONBJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTJSONBJSONB */ + case AntlrSQLLexer::ALWAYSEQTJSONBJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTJSONBJSONB requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTjsonbJsonbLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTJSONBJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETJSONBJSONB */ + case AntlrSQLLexer::ALWAYSNETJSONBJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETJSONBJSONB requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTjsonbJsonbLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETJSONBJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTJSONBTJSONB */ + case AntlrSQLLexer::EVEREQTJSONBTJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EVEREQTJSONBTJSONB requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTjsonbTjsonbLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTJSONBTJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETJSONBTJSONB */ + case AntlrSQLLexer::EVERNETJSONBTJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("EVERNETJSONBTJSONB requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTjsonbTjsonbLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETJSONBTJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTJSONBTJSONB */ + case AntlrSQLLexer::ALWAYSEQTJSONBTJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ALWAYSEQTJSONBTJSONB requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTjsonbTjsonbLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTJSONBTJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETJSONBTJSONB */ + case AntlrSQLLexer::ALWAYSNETJSONBTJSONB: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ALWAYSNETJSONBTJSONB requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTjsonbTjsonbLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETJSONBTJSONB */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TNPOINT_GEO */ + case AntlrSQLLexer::NAD_TNPOINT_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("NAD_TNPOINT_GEO requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTnpointGeoLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TNPOINT_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TNPOINT_NPOINT */ + case AntlrSQLLexer::NAD_TNPOINT_NPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("NAD_TNPOINT_NPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTnpointNpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TNPOINT_NPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TNPOINT_TNPOINT */ + case AntlrSQLLexer::NAD_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("NAD_TNPOINT_TNPOINT requires exactly 6 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTnpointTnpointLogicalFunction(a0, a1, a2, a3, a4, a5)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQNPOINTTNPOINT */ + case AntlrSQLLexer::EVEREQNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EVEREQNPOINTTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqNpointTnpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTNPOINTNPOINT */ + case AntlrSQLLexer::EVEREQTNPOINTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EVEREQTNPOINTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTnpointNpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTNPOINTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTNPOINTTNPOINT */ + case AntlrSQLLexer::EVEREQTNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVEREQTNPOINTTNPOINT requires exactly 6 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTnpointTnpointLogicalFunction(a0, a1, a2, a3, a4, a5)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNENPOINTTNPOINT */ + case AntlrSQLLexer::EVERNENPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EVERNENPOINTTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeNpointTnpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNENPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETNPOINTNPOINT */ + case AntlrSQLLexer::EVERNETNPOINTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EVERNETNPOINTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTnpointNpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETNPOINTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETNPOINTTNPOINT */ + case AntlrSQLLexer::EVERNETNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVERNETNPOINTTNPOINT requires exactly 6 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTnpointTnpointLogicalFunction(a0, a1, a2, a3, a4, a5)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQNPOINTTNPOINT */ + case AntlrSQLLexer::ALWAYSEQNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ALWAYSEQNPOINTTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqNpointTnpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTNPOINTNPOINT */ + case AntlrSQLLexer::ALWAYSEQTNPOINTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ALWAYSEQTNPOINTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTnpointNpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTNPOINTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTNPOINTTNPOINT */ + case AntlrSQLLexer::ALWAYSEQTNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSEQTNPOINTTNPOINT requires exactly 6 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTnpointTnpointLogicalFunction(a0, a1, a2, a3, a4, a5)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNENPOINTTNPOINT */ + case AntlrSQLLexer::ALWAYSNENPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ALWAYSNENPOINTTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeNpointTnpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNENPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETNPOINTNPOINT */ + case AntlrSQLLexer::ALWAYSNETNPOINTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ALWAYSNETNPOINTNPOINT requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTnpointNpointLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETNPOINTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETNPOINTTNPOINT */ + case AntlrSQLLexer::ALWAYSNETNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSNETNPOINTTNPOINT requires exactly 6 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTnpointTnpointLogicalFunction(a0, a1, a2, a3, a4, a5)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TPOSE_POSE */ + case AntlrSQLLexer::NAD_TPOSE_POSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("NAD_TPOSE_POSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTposePoseLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TPOSE_POSE */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TPOSE_TPOSE */ + case AntlrSQLLexer::NAD_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("NAD_TPOSE_TPOSE requires exactly 8 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a7 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTposeTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6, a7)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TPOSE_GEO */ + case AntlrSQLLexer::NAD_TPOSE_GEO: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("NAD_TPOSE_GEO requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTposeGeoLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TPOSE_GEO */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQPOSETPOSE */ + case AntlrSQLLexer::EVEREQPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("EVEREQPOSETPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqPoseTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTPOSEPOSE */ + case AntlrSQLLexer::EVEREQTPOSEPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("EVEREQTPOSEPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTposePoseLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTPOSEPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTPOSETPOSE */ + case AntlrSQLLexer::EVEREQTPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EVEREQTPOSETPOSE requires exactly 8 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a7 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverEqTposeTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6, a7)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNEPOSETPOSE */ + case AntlrSQLLexer::EVERNEPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("EVERNEPOSETPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNePoseTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNEPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETPOSEPOSE */ + case AntlrSQLLexer::EVERNETPOSEPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("EVERNETPOSEPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTposePoseLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETPOSEPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETPOSETPOSE */ + case AntlrSQLLexer::EVERNETPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("EVERNETPOSETPOSE requires exactly 8 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a7 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(EverNeTposeTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6, a7)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQPOSETPOSE */ + case AntlrSQLLexer::ALWAYSEQPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("ALWAYSEQPOSETPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqPoseTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTPOSEPOSE */ + case AntlrSQLLexer::ALWAYSEQTPOSEPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("ALWAYSEQTPOSEPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTposePoseLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTPOSEPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTPOSETPOSE */ + case AntlrSQLLexer::ALWAYSEQTPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ALWAYSEQTPOSETPOSE requires exactly 8 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a7 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysEqTposeTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6, a7)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNEPOSETPOSE */ + case AntlrSQLLexer::ALWAYSNEPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("ALWAYSNEPOSETPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNePoseTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNEPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETPOSEPOSE */ + case AntlrSQLLexer::ALWAYSNETPOSEPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("ALWAYSNETPOSEPOSE requires exactly 7 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTposePoseLogicalFunction(a0, a1, a2, a3, a4, a5, a6)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETPOSEPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETPOSETPOSE */ + case AntlrSQLLexer::ALWAYSNETPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("ALWAYSNETPOSETPOSE requires exactly 8 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a7 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a6 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a5 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(AlwaysNeTposeTposeLogicalFunction(a0, a1, a2, a3, a4, a5, a6, a7)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMBOUNDARY */ + case AntlrSQLLexer::GEOMBOUNDARY: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMBOUNDARY requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomBoundaryLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMBOUNDARY */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMCENTROID */ + case AntlrSQLLexer::GEOMCENTROID: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMCENTROID requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomCentroidLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMCENTROID */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMCONVEXHULL */ + case AntlrSQLLexer::GEOMCONVEXHULL: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMCONVEXHULL requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomConvexHullLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMCONVEXHULL */ + + /* BEGIN CODEGEN PARSER GLUE: GEOREVERSE */ + case AntlrSQLLexer::GEOREVERSE: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOREVERSE requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoReverseLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOREVERSE */ + + /* BEGIN CODEGEN PARSER GLUE: GEOPOINTS */ + case AntlrSQLLexer::GEOPOINTS: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOPOINTS requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoPointsLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOPOINTS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMUNARYUNION */ + case AntlrSQLLexer::GEOMUNARYUNION: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMUNARYUNION requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomUnaryUnionLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMUNARYUNION */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_SET_SRID */ + case AntlrSQLLexer::GEO_SET_SRID: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEO_SET_SRID requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoSetSridLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_SET_SRID */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_ROUND */ + case AntlrSQLLexer::GEO_ROUND: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEO_ROUND requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoRoundLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_ROUND */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_TRANSFORM */ + case AntlrSQLLexer::GEO_TRANSFORM: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEO_TRANSFORM requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoTransformLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_TRANSFORM */ + + /* BEGIN CODEGEN PARSER GLUE: GEOSRID */ + case AntlrSQLLexer::GEOSRID: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOSRID requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoSridLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOSRID */ + + /* BEGIN CODEGEN PARSER GLUE: GEONUMGEOS */ + case AntlrSQLLexer::GEONUMGEOS: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEONUMGEOS requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoNumGeosLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEONUMGEOS */ + + /* BEGIN CODEGEN PARSER GLUE: GEONUMPOINTS */ + case AntlrSQLLexer::GEONUMPOINTS: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEONUMPOINTS requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoNumPointsLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEONUMPOINTS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMLENGTH */ + case AntlrSQLLexer::GEOMLENGTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMLENGTH requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomLengthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMLENGTH */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMPERIMETER */ + case AntlrSQLLexer::GEOMPERIMETER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMPERIMETER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomPerimeterLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMPERIMETER */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMISEMPTY */ + case AntlrSQLLexer::GEOMISEMPTY: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMISEMPTY requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomIsEmptyLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMISEMPTY */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMAZIMUTH */ + case AntlrSQLLexer::GEOMAZIMUTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMAZIMUTH requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomAzimuthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMAZIMUTH */ + + /* BEGIN CODEGEN PARSER GLUE: GEOISUNITARY */ + case AntlrSQLLexer::GEOISUNITARY: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOISUNITARY requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoIsUnitaryLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOISUNITARY */ + + /* BEGIN CODEGEN PARSER GLUE: GEOEQUALS */ + case AntlrSQLLexer::GEOEQUALS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOEQUALS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoEqualsLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOEQUALS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOSAME */ + case AntlrSQLLexer::GEOSAME: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOSAME requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoSameLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOSAME */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMINTERSECTS */ + case AntlrSQLLexer::GEOMINTERSECTS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMINTERSECTS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomIntersectsLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMINTERSECTS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMINTERSECTS2D */ + case AntlrSQLLexer::GEOMINTERSECTS2D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMINTERSECTS2D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomIntersects2dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMINTERSECTS2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMINTERSECTS3D */ + case AntlrSQLLexer::GEOMINTERSECTS3D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMINTERSECTS3D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomIntersects3dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMINTERSECTS3D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMCONTAINS */ + case AntlrSQLLexer::GEOMCONTAINS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMCONTAINS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomContainsLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMCONTAINS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMCOVERS */ + case AntlrSQLLexer::GEOMCOVERS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMCOVERS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomCoversLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMCOVERS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDISJOINT2D */ + case AntlrSQLLexer::GEOMDISJOINT2D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMDISJOINT2D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDisjoint2dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDISJOINT2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMTOUCHES */ + case AntlrSQLLexer::GEOMTOUCHES: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMTOUCHES requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomTouchesLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMTOUCHES */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGINTERSECTS */ + case AntlrSQLLexer::GEOGINTERSECTS: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOGINTERSECTS requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogIntersectsLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGINTERSECTS */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGDISTANCE */ + case AntlrSQLLexer::GEOGDISTANCE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOGDISTANCE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogDistanceLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGDISTANCE */ + + /* BEGIN CODEGEN PARSER GLUE: LINELOCATEPOINT */ + case AntlrSQLLexer::LINELOCATEPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("LINELOCATEPOINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(LineLocatePointLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: LINELOCATEPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDISTANCE2D */ + case AntlrSQLLexer::GEOMDISTANCE2D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMDISTANCE2D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDistance2dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDISTANCE2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDISTANCE3D */ + case AntlrSQLLexer::GEOMDISTANCE3D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMDISTANCE3D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDistance3dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDISTANCE3D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDWITHIN2D */ + case AntlrSQLLexer::GEOMDWITHIN2D: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOMDWITHIN2D requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDwithin2dLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDWITHIN2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDWITHIN3D */ + case AntlrSQLLexer::GEOMDWITHIN3D: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOMDWITHIN3D requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDwithin3dLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDWITHIN3D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGDWITHIN */ + case AntlrSQLLexer::GEOGDWITHIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOGDWITHIN requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogDwithinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGDWITHIN */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDWITHIN */ + case AntlrSQLLexer::GEOMDWITHIN: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOMDWITHIN requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDwithinLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDWITHIN */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMINTERSECTION2D */ + case AntlrSQLLexer::GEOMINTERSECTION2D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMINTERSECTION2D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomIntersection2dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMINTERSECTION2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMINTERSECTION2DCOLL */ + case AntlrSQLLexer::GEOMINTERSECTION2DCOLL: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMINTERSECTION2DCOLL requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomIntersection2dCollLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMINTERSECTION2DCOLL */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMDIFFERENCE2D */ + case AntlrSQLLexer::GEOMDIFFERENCE2D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMDIFFERENCE2D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomDifference2dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMDIFFERENCE2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMSHORTESTLINE2D */ + case AntlrSQLLexer::GEOMSHORTESTLINE2D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMSHORTESTLINE2D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomShortestline2dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMSHORTESTLINE2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMSHORTESTLINE3D */ + case AntlrSQLLexer::GEOMSHORTESTLINE3D: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOMSHORTESTLINE3D requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomShortestline3dLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMSHORTESTLINE3D */ + + /* BEGIN CODEGEN PARSER GLUE: LINE_INTERPOLATE_POINT */ + case AntlrSQLLexer::LINE_INTERPOLATE_POINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("LINE_INTERPOLATE_POINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(LineInterpolatePointLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: LINE_INTERPOLATE_POINT */ + + /* BEGIN CODEGEN PARSER GLUE: LINE_SUBSTRING */ + case AntlrSQLLexer::LINE_SUBSTRING: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("LINE_SUBSTRING requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(LineSubstringLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: LINE_SUBSTRING */ + + /* BEGIN CODEGEN PARSER GLUE: LINE_NUMPOINTS */ + case AntlrSQLLexer::LINE_NUMPOINTS: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("LINE_NUMPOINTS requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(LineNumpointsLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: LINE_NUMPOINTS */ + + /* BEGIN CODEGEN PARSER GLUE: LINE_POINT_N */ + case AntlrSQLLexer::LINE_POINT_N: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("LINE_POINT_N requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(LinePointNLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: LINE_POINT_N */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_GEO_N */ + case AntlrSQLLexer::GEO_GEO_N: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEO_GEO_N requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoGeoNLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_GEO_N */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_AS_EWKT */ + case AntlrSQLLexer::GEO_AS_EWKT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEO_AS_EWKT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoAsEwktLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_AS_EWKT */ + + /* BEGIN CODEGEN PARSER GLUE: GEO_AS_GEOJSON */ + case AntlrSQLLexer::GEO_AS_GEOJSON: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEO_AS_GEOJSON requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeoAsGeojsonLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEO_AS_GEOJSON */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_POINT_MAKE2D */ + case AntlrSQLLexer::GEOM_POINT_MAKE2D: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOM_POINT_MAKE2D requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomPointMake2dLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_POINT_MAKE2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOM_POINT_MAKE3DZ */ + case AntlrSQLLexer::GEOM_POINT_MAKE3DZ: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("GEOM_POINT_MAKE3DZ requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomPointMake3dzLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: GEOM_POINT_MAKE3DZ */ + + /* BEGIN CODEGEN PARSER GLUE: GEOG_POINT_MAKE2D */ + case AntlrSQLLexer::GEOG_POINT_MAKE2D: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("GEOG_POINT_MAKE2D requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogPointMake2dLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: GEOG_POINT_MAKE2D */ + + /* BEGIN CODEGEN PARSER GLUE: GEOG_POINT_MAKE3DZ */ + case AntlrSQLLexer::GEOG_POINT_MAKE3DZ: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("GEOG_POINT_MAKE3DZ requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogPointMake3dzLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: GEOG_POINT_MAKE3DZ */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGAREA */ + case AntlrSQLLexer::GEOGAREA: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOGAREA requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogAreaLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGAREA */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGLENGTH */ + case AntlrSQLLexer::GEOGLENGTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOGLENGTH requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogLengthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGLENGTH */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGPERIMETER */ + case AntlrSQLLexer::GEOGPERIMETER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOGPERIMETER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogPerimeterLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGPERIMETER */ + + /* BEGIN CODEGEN PARSER GLUE: GEOGTOGEOM */ + case AntlrSQLLexer::GEOGTOGEOM: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOGTOGEOM requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogToGeomLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOGTOGEOM */ + + /* BEGIN CODEGEN PARSER GLUE: GEOMTOGEOG */ + case AntlrSQLLexer::GEOMTOGEOG: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("GEOMTOGEOG requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeomToGeogLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: GEOMTOGEOG */ + + /* BEGIN CODEGEN PARSER GLUE: GEOG_CENTROID */ + case AntlrSQLLexer::GEOG_CENTROID: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("GEOG_CENTROID requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(GeogCentroidLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: GEOG_CENTROID */ + + /* BEGIN CODEGEN PARSER GLUE: INTSPANLOWER */ + case AntlrSQLLexer::INTSPANLOWER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("INTSPANLOWER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(IntspanLowerLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: INTSPANLOWER */ + + /* BEGIN CODEGEN PARSER GLUE: INTSPANUPPER */ + case AntlrSQLLexer::INTSPANUPPER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("INTSPANUPPER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(IntspanUpperLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: INTSPANUPPER */ + + /* BEGIN CODEGEN PARSER GLUE: INTSPANWIDTH */ + case AntlrSQLLexer::INTSPANWIDTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("INTSPANWIDTH requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(IntspanWidthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: INTSPANWIDTH */ + + /* BEGIN CODEGEN PARSER GLUE: INTSPANLOWERINC */ + case AntlrSQLLexer::INTSPANLOWERINC: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("INTSPANLOWERINC requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(IntspanLowerIncLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: INTSPANLOWERINC */ + + /* BEGIN CODEGEN PARSER GLUE: INTSPANUPPERINC */ + case AntlrSQLLexer::INTSPANUPPERINC: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("INTSPANUPPERINC requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(IntspanUpperIncLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: INTSPANUPPERINC */ + + /* BEGIN CODEGEN PARSER GLUE: FLOATSPANLOWER */ + case AntlrSQLLexer::FLOATSPANLOWER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("FLOATSPANLOWER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(FloatspanLowerLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: FLOATSPANLOWER */ + + /* BEGIN CODEGEN PARSER GLUE: FLOATSPANUPPER */ + case AntlrSQLLexer::FLOATSPANUPPER: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("FLOATSPANUPPER requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(FloatspanUpperLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: FLOATSPANUPPER */ + + /* BEGIN CODEGEN PARSER GLUE: FLOATSPANWIDTH */ + case AntlrSQLLexer::FLOATSPANWIDTH: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("FLOATSPANWIDTH requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(FloatspanWidthLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: FLOATSPANWIDTH */ + + /* BEGIN CODEGEN PARSER GLUE: FLOATSPANLOWERINC */ + case AntlrSQLLexer::FLOATSPANLOWERINC: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("FLOATSPANLOWERINC requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(FloatspanLowerIncLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: FLOATSPANLOWERINC */ + + /* BEGIN CODEGEN PARSER GLUE: FLOATSPANUPPERINC */ + case AntlrSQLLexer::FLOATSPANUPPERINC: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("FLOATSPANUPPERINC requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(FloatspanUpperIncLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: FLOATSPANUPPERINC */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINED_INT_SPAN */ + case AntlrSQLLexer::CONTAINED_INT_SPAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINED_INT_SPAN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainedIntSpanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINED_INT_SPAN */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINED_FLOAT_SPAN */ + case AntlrSQLLexer::CONTAINED_FLOAT_SPAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINED_FLOAT_SPAN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainedFloatSpanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINED_FLOAT_SPAN */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINED_SPAN_SPAN */ + case AntlrSQLLexer::CONTAINED_SPAN_SPAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINED_SPAN_SPAN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainedSpanSpanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINED_SPAN_SPAN */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINED_FLOATSPAN_SPAN */ + case AntlrSQLLexer::CONTAINED_FLOATSPAN_SPAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINED_FLOATSPAN_SPAN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainedFloatspanSpanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINED_FLOATSPAN_SPAN */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINS_SPAN_INT */ + case AntlrSQLLexer::CONTAINS_SPAN_INT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINS_SPAN_INT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainsSpanIntLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINS_SPAN_INT */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINS_SPAN_FLOAT */ + case AntlrSQLLexer::CONTAINS_SPAN_FLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINS_SPAN_FLOAT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainsSpanFloatLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINS_SPAN_FLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINS_SPAN_SPAN */ + case AntlrSQLLexer::CONTAINS_SPAN_SPAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINS_SPAN_SPAN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainsSpanSpanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINS_SPAN_SPAN */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINS_FLOATSPAN_SPAN */ + case AntlrSQLLexer::CONTAINS_FLOATSPAN_SPAN: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINS_FLOATSPAN_SPAN requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(ContainsFloatspanSpanLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINS_FLOATSPAN_SPAN */ + + case AntlrSQLParser::ACONTAINS_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "AcontainsGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AcontainsGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ACONTAINS_GEO_TRGEOMETRY */ + case AntlrSQLParser::ACOVERS_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "AcoversGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AcoversGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ACOVERS_GEO_TRGEOMETRY */ + case AntlrSQLParser::ACOVERS_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "AcoversTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AcoversTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ACOVERS_TRGEOMETRY_GEO */ + case AntlrSQLParser::ADISJOINT_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "AdisjointTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AdisjointTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ADISJOINT_TRGEOMETRY_GEO */ + case AntlrSQLParser::ADISJOINT_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "AdisjointTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(AdisjointTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: ADISJOINT_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::ADWITHIN_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 7, + "AdwithinTrgeometryGeo requires 7 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + return LogicalFunction(AdwithinTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6))); + } + /* END CODEGEN PARSER GLUE: ADWITHIN_TRGEOMETRY_GEO */ + case AntlrSQLParser::ADWITHIN_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 11, + "AdwithinTrgeometryTrgeometry requires 11 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + auto arg10 = visit(ctx->functionParam(10)).as(); + return LogicalFunction(AdwithinTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9), std::move(arg10))); + } + /* END CODEGEN PARSER GLUE: ADWITHIN_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::AINTERSECTS_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "AintersectsTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AintersectsTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: AINTERSECTS_TRGEOMETRY_GEO */ + case AntlrSQLParser::AINTERSECTS_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "AintersectsTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(AintersectsTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: AINTERSECTS_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::ALWAYS_EQ_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "AlwaysEqGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AlwaysEqGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_GEO_TRGEOMETRY */ + case AntlrSQLParser::ALWAYS_EQ_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "AlwaysEqTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AlwaysEqTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TRGEOMETRY_GEO */ + case AntlrSQLParser::ALWAYS_EQ_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "AlwaysEqTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(AlwaysEqTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: ALWAYS_EQ_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::ALWAYS_NE_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "AlwaysNeGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AlwaysNeGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ALWAYS_NE_GEO_TRGEOMETRY */ + case AntlrSQLParser::ALWAYS_NE_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "AlwaysNeTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AlwaysNeTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TRGEOMETRY_GEO */ + case AntlrSQLParser::ALWAYS_NE_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "AlwaysNeTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(AlwaysNeTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: ALWAYS_NE_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::ATOUCHES_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "AtouchesTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(AtouchesTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ATOUCHES_TRGEOMETRY_GEO */ + case AntlrSQLParser::ECONTAINS_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "EcontainsGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EcontainsGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ECONTAINS_GEO_TRGEOMETRY */ + case AntlrSQLParser::ECOVERS_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "EcoversGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EcoversGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ECOVERS_GEO_TRGEOMETRY */ + case AntlrSQLParser::ECOVERS_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "EcoversTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EcoversTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ECOVERS_TRGEOMETRY_GEO */ + case AntlrSQLParser::EDISJOINT_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "EdisjointTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EdisjointTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: EDISJOINT_TRGEOMETRY_GEO */ + case AntlrSQLParser::EDISJOINT_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "EdisjointTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(EdisjointTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: EDISJOINT_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::EDWITHIN_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 7, + "EdwithinTrgeometryGeo requires 7 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + return LogicalFunction(EdwithinTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6))); + } + /* END CODEGEN PARSER GLUE: EDWITHIN_TRGEOMETRY_GEO */ + case AntlrSQLParser::EDWITHIN_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 11, + "EdwithinTrgeometryTrgeometry requires 11 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + auto arg10 = visit(ctx->functionParam(10)).as(); + return LogicalFunction(EdwithinTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9), std::move(arg10))); + } + /* END CODEGEN PARSER GLUE: EDWITHIN_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::EINTERSECTS_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "EintersectsTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EintersectsTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: EINTERSECTS_TRGEOMETRY_GEO */ + case AntlrSQLParser::EINTERSECTS_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "EintersectsTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(EintersectsTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: EINTERSECTS_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::ETOUCHES_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "EtouchesTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EtouchesTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: ETOUCHES_TRGEOMETRY_GEO */ + case AntlrSQLParser::EVER_EQ_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "EverEqGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EverEqGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: EVER_EQ_GEO_TRGEOMETRY */ + case AntlrSQLParser::EVER_EQ_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "EverEqTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EverEqTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: EVER_EQ_TRGEOMETRY_GEO */ + case AntlrSQLParser::EVER_EQ_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "EverEqTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(EverEqTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: EVER_EQ_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::EVER_NE_GEO_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 6, + "EverNeGeoTrgeometry requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EverNeGeoTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: EVER_NE_GEO_TRGEOMETRY */ + case AntlrSQLParser::EVER_NE_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "EverNeTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(EverNeTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: EVER_NE_TRGEOMETRY_GEO */ + case AntlrSQLParser::EVER_NE_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "EverNeTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(EverNeTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: EVER_NE_TRGEOMETRY_TRGEOMETRY */ + case AntlrSQLParser::NAD_TRGEOMETRY_GEO: { + PRECONDITION(ctx->functionParam().size() == 6, + "NadTrgeometryGeo requires 6 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + return LogicalFunction(NadTrgeometryGeoLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5))); + } + /* END CODEGEN PARSER GLUE: NAD_TRGEOMETRY_GEO */ + case AntlrSQLParser::NAD_TRGEOMETRY_TRGEOMETRY: { + PRECONDITION(ctx->functionParam().size() == 10, + "NadTrgeometryTrgeometry requires 10 args but got {}", + ctx->functionParam().size()); + auto arg0 = visit(ctx->functionParam(0)).as(); + auto arg1 = visit(ctx->functionParam(1)).as(); + auto arg2 = visit(ctx->functionParam(2)).as(); + auto arg3 = visit(ctx->functionParam(3)).as(); + auto arg4 = visit(ctx->functionParam(4)).as(); + auto arg5 = visit(ctx->functionParam(5)).as(); + auto arg6 = visit(ctx->functionParam(6)).as(); + auto arg7 = visit(ctx->functionParam(7)).as(); + auto arg8 = visit(ctx->functionParam(8)).as(); + auto arg9 = visit(ctx->functionParam(9)).as(); + return LogicalFunction(NadTrgeometryTrgeometryLogicalFunction(std::move(arg0), std::move(arg1), std::move(arg2), std::move(arg3), std::move(arg4), std::move(arg5), std::move(arg6), std::move(arg7), std::move(arg8), std::move(arg9))); + } + /* END CODEGEN PARSER GLUE: NAD_TRGEOMETRY_TRGEOMETRY */ + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ECOVERS_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ECOVERS_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_EDISJOINT_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_EDISJOINT_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ADISJOINT_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ADISJOINT_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ETOUCHES_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ETOUCHES_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ATOUCHES_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ATOUCHES_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ECONTAINS_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ECONTAINS_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ACONTAINS_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ACONTAINS_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_EDWITHIN_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_EDWITHIN_TPOSE_GEOMETRY requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ADWITHIN_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ADWITHIN_TPOSE_GEOMETRY requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_EINTERSECTS_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_EINTERSECTS_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_AINTERSECTS_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_AINTERSECTS_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ECOVERS_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ECOVERS_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_EDISJOINT_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_EDISJOINT_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ADISJOINT_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ADISJOINT_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ETOUCHES_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ETOUCHES_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ATOUCHES_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ATOUCHES_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ECONTAINS_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ECONTAINS_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ACONTAINS_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ACONTAINS_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_EDWITHIN_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("TEMPORAL_EDWITHIN_TPOSE_TPOSE requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTPoseTPoseLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_ADWITHIN_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("TEMPORAL_ADWITHIN_TPOSE_TPOSE requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTPoseTPoseLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TPOSE_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_NAD_TPOSE_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_NAD_TPOSE_GEOMETRY requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTPoseGeometryLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TPOSE_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TPOSE_TPOSE */ + case AntlrSQLLexer::TEMPORAL_NAD_TPOSE_TPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_NAD_TPOSE_TPOSE requires exactly 8 arguments (xA, yA, thetaA, tsA, xB, yB, thetaB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto thetaA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto yA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto xA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTPoseTPoseLogicalFunction(xA, yA, thetaA, tsA, xB, yB, thetaB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TPOSE_TPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ECOVERS_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_ECOVERS_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY requires exactly 5 arguments (lon, lat, timestamp, geometry, distance), but got {}", argCount); + + /* Lift constants (geometry + distance) — same shape as EDWITHIN_TGEO_GEO */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + const auto upperValue = Util::toUpperCase(constantValue); + if (upperValue == "TRUE" || upperValue == "FALSE") + { + dataType = DataTypeProvider::provideDataType(DataType::Type::BOOLEAN); + } + else + { + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + } + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + /* After lift: [lon, lat, ts, distance, geometry] (geometry pushed last because lifted last in LIFO) */ + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY requires exactly 5 arguments (lon, lat, timestamp, geometry, distance), but got {}", argCount); + + /* Lift constants (geometry + distance) — same shape as EDWITHIN_TGEO_GEO */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + const auto upperValue = Util::toUpperCase(constantValue); + if (upperValue == "TRUE" || upperValue == "FALSE") + { + dataType = DataTypeProvider::provideDataType(DataType::Type::BOOLEAN); + } + else + { + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + } + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + /* After lift: [lon, lat, ts, distance, geometry] (geometry pushed last because lifted last in LIFO) */ + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_AINTERSECTS_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ECOVERS_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ECOVERS_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECOVERS_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_EDISJOINT_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_EDISJOINT_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDISJOINT_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ADISJOINT_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ADISJOINT_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADISJOINT_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ETOUCHES_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ETOUCHES_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ATOUCHES_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ATOUCHES_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ATOUCHES_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ECONTAINS_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ECONTAINS_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ECONTAINS_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ACONTAINS_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_ACONTAINS_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ACONTAINS_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_EDWITHIN_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("TEMPORAL_EDWITHIN_TNPOINT_TNPOINT requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EDWITHIN_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_ADWITHIN_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("TEMPORAL_ADWITHIN_TNPOINT_TNPOINT requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ADWITHIN_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TNPOINT_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_NAD_TNPOINT_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_NAD_TNPOINT_GEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTNpointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TNPOINT_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TNPOINT_TNPOINT */ + case AntlrSQLLexer::TEMPORAL_NAD_TNPOINT_TNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_NAD_TNPOINT_TNPOINT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTNpointTNpointLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TNPOINT_TNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: ABOVESTBOXSTBOX */ + case AntlrSQLLexer::ABOVESTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("ABOVESTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AboveStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: ABOVESTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTSTBOXSTBOX */ + case AntlrSQLLexer::ADJACENTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("ADJACENTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERSTBOXSTBOX */ + case AntlrSQLLexer::AFTERSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("AFTERSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BACKSTBOXSTBOX */ + case AntlrSQLLexer::BACKSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("BACKSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BackStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: BACKSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORESTBOXSTBOX */ + case AntlrSQLLexer::BEFORESTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("BEFORESTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORESTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BELOWSTBOXSTBOX */ + case AntlrSQLLexer::BELOWSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("BELOWSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BelowStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: BELOWSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDSTBOXSTBOX */ + case AntlrSQLLexer::CONTAINEDSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINEDSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSSTBOXSTBOX */ + case AntlrSQLLexer::CONTAINSSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINSSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: FRONTSTBOXSTBOX */ + case AntlrSQLLexer::FRONTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("FRONTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + FrontStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: FRONTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTSTBOXSTBOX */ + case AntlrSQLLexer::LEFTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("LEFTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERABOVESTBOXSTBOX */ + case AntlrSQLLexer::OVERABOVESTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERABOVESTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OveraboveStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERABOVESTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERSTBOXSTBOX */ + case AntlrSQLLexer::OVERAFTERSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERAFTERSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBACKSTBOXSTBOX */ + case AntlrSQLLexer::OVERBACKSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERBACKSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbackStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBACKSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORESTBOXSTBOX */ + case AntlrSQLLexer::OVERBEFORESTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERBEFORESTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORESTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBELOWSTBOXSTBOX */ + case AntlrSQLLexer::OVERBELOWSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERBELOWSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbelowStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBELOWSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERFRONTSTBOXSTBOX */ + case AntlrSQLLexer::OVERFRONTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERFRONTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverfrontStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERFRONTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSSTBOXSTBOX */ + case AntlrSQLLexer::OVERLAPSSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERLAPSSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTSTBOXSTBOX */ + case AntlrSQLLexer::OVERLEFTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERLEFTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTSTBOXSTBOX */ + case AntlrSQLLexer::OVERRIGHTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERRIGHTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTSTBOXSTBOX */ + case AntlrSQLLexer::RIGHTSTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("RIGHTSTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTSTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: SAMESTBOXSTBOX */ + case AntlrSQLLexer::SAMESTBOXSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("SAMESTBOXSTBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: SAMESTBOXSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: STBOXEQ */ + case AntlrSQLLexer::STBOXEQ: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOXEQ requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxEqLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOXEQ */ + + /* BEGIN CODEGEN PARSER GLUE: STBOXGE */ + case AntlrSQLLexer::STBOXGE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOXGE requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxGeLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOXGE */ + + /* BEGIN CODEGEN PARSER GLUE: STBOXGT */ + case AntlrSQLLexer::STBOXGT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOXGT requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxGtLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOXGT */ + + /* BEGIN CODEGEN PARSER GLUE: STBOXLE */ + case AntlrSQLLexer::STBOXLE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOXLE requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxLeLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOXLE */ + + /* BEGIN CODEGEN PARSER GLUE: STBOXLT */ + case AntlrSQLLexer::STBOXLT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOXLT requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxLtLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOXLT */ + + /* BEGIN CODEGEN PARSER GLUE: STBOXNE */ + case AntlrSQLLexer::STBOXNE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOXNE requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxNeLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOXNE */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_STBOX_STBOX */ + case AntlrSQLLexer::NAD_STBOX_STBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("NAD_STBOX_STBOX requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadStboxStboxLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_STBOX_STBOX */ + + /* BEGIN CODEGEN PARSER GLUE: STBOX_CMP */ + case AntlrSQLLexer::STBOX_CMP: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("STBOX_CMP requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + StboxCmpLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: STBOX_CMP */ + + /* BEGIN CODEGEN PARSER GLUE: ABOVESTBOXTSPATIAL */ + case AntlrSQLLexer::ABOVESTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ABOVESTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AboveStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ABOVESTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTSTBOXTSPATIAL */ + case AntlrSQLLexer::ADJACENTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ADJACENTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERSTBOXTSPATIAL */ + case AntlrSQLLexer::AFTERSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("AFTERSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: BACKSTBOXTSPATIAL */ + case AntlrSQLLexer::BACKSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("BACKSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BackStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: BACKSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORESTBOXTSPATIAL */ + case AntlrSQLLexer::BEFORESTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("BEFORESTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORESTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: BELOWSTBOXTSPATIAL */ + case AntlrSQLLexer::BELOWSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("BELOWSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BelowStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: BELOWSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDSTBOXTSPATIAL */ + case AntlrSQLLexer::CONTAINEDSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("CONTAINEDSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSSTBOXTSPATIAL */ + case AntlrSQLLexer::CONTAINSSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("CONTAINSSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: FRONTSTBOXTSPATIAL */ + case AntlrSQLLexer::FRONTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("FRONTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + FrontStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: FRONTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTSTBOXTSPATIAL */ + case AntlrSQLLexer::LEFTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("LEFTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERABOVESTBOXTSPATIAL */ + case AntlrSQLLexer::OVERABOVESTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERABOVESTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OveraboveStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERABOVESTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERAFTERSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERAFTERSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBACKSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERBACKSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERBACKSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbackStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBACKSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORESTBOXTSPATIAL */ + case AntlrSQLLexer::OVERBEFORESTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERBEFORESTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORESTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBELOWSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERBELOWSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERBELOWSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbelowStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBELOWSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERFRONTSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERFRONTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERFRONTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverfrontStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERFRONTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERLAPSSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERLAPSSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERLEFTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERLEFTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTSTBOXTSPATIAL */ + case AntlrSQLLexer::OVERRIGHTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERRIGHTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTSTBOXTSPATIAL */ + case AntlrSQLLexer::RIGHTSTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("RIGHTSTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTSTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: SAMESTBOXTSPATIAL */ + case AntlrSQLLexer::SAMESTBOXTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("SAMESTBOXTSPATIAL requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameStboxTspatialLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: SAMESTBOXTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: ABOVETSPATIALSTBOX */ + case AntlrSQLLexer::ABOVETSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ABOVETSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AboveTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ABOVETSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTTSPATIALSTBOX */ + case AntlrSQLLexer::ADJACENTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ADJACENTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERTSPATIALSTBOX */ + case AntlrSQLLexer::AFTERTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("AFTERTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BACKTSPATIALSTBOX */ + case AntlrSQLLexer::BACKTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("BACKTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BackTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: BACKTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORETSPATIALSTBOX */ + case AntlrSQLLexer::BEFORETSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("BEFORETSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORETSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BELOWTSPATIALSTBOX */ + case AntlrSQLLexer::BELOWTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("BELOWTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BelowTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: BELOWTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDTSPATIALSTBOX */ + case AntlrSQLLexer::CONTAINEDTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("CONTAINEDTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSTSPATIALSTBOX */ + case AntlrSQLLexer::CONTAINSTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("CONTAINSTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: FRONTTSPATIALSTBOX */ + case AntlrSQLLexer::FRONTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("FRONTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + FrontTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: FRONTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTTSPATIALSTBOX */ + case AntlrSQLLexer::LEFTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("LEFTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERABOVETSPATIALSTBOX */ + case AntlrSQLLexer::OVERABOVETSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERABOVETSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OveraboveTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERABOVETSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERTSPATIALSTBOX */ + case AntlrSQLLexer::OVERAFTERTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERAFTERTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBACKTSPATIALSTBOX */ + case AntlrSQLLexer::OVERBACKTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERBACKTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbackTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBACKTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORETSPATIALSTBOX */ + case AntlrSQLLexer::OVERBEFORETSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERBEFORETSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORETSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBELOWTSPATIALSTBOX */ + case AntlrSQLLexer::OVERBELOWTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERBELOWTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbelowTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBELOWTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERFRONTTSPATIALSTBOX */ + case AntlrSQLLexer::OVERFRONTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERFRONTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverfrontTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERFRONTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSTSPATIALSTBOX */ + case AntlrSQLLexer::OVERLAPSTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERLAPSTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTTSPATIALSTBOX */ + case AntlrSQLLexer::OVERLEFTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERLEFTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTTSPATIALSTBOX */ + case AntlrSQLLexer::OVERRIGHTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("OVERRIGHTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTTSPATIALSTBOX */ + case AntlrSQLLexer::RIGHTTSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("RIGHTTSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTTSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: SAMETSPATIALSTBOX */ + case AntlrSQLLexer::SAMETSPATIALSTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("SAMETSPATIALSTBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameTspatialStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: SAMETSPATIALSTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TGEO_STBOX */ + case AntlrSQLLexer::NAD_TGEO_STBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("NAD_TGEO_STBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTgeoStboxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TGEO_STBOX */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTTBOXTNUMBER */ + case AntlrSQLLexer::ADJACENTTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADJACENTTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERTBOXTNUMBER */ + case AntlrSQLLexer::AFTERTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("AFTERTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORETBOXTNUMBER */ + case AntlrSQLLexer::BEFORETBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("BEFORETBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORETBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDTBOXTNUMBER */ + case AntlrSQLLexer::CONTAINEDTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("CONTAINEDTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSTBOXTNUMBER */ + case AntlrSQLLexer::CONTAINSTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("CONTAINSTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTTBOXTNUMBER */ + case AntlrSQLLexer::LEFTTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("LEFTTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERTBOXTNUMBER */ + case AntlrSQLLexer::OVERAFTERTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERAFTERTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORETBOXTNUMBER */ + case AntlrSQLLexer::OVERBEFORETBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERBEFORETBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORETBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSTBOXTNUMBER */ + case AntlrSQLLexer::OVERLAPSTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERLAPSTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTTBOXTNUMBER */ + case AntlrSQLLexer::OVERLEFTTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERLEFTTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTTBOXTNUMBER */ + case AntlrSQLLexer::OVERRIGHTTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERRIGHTTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTTBOXTNUMBER */ + case AntlrSQLLexer::RIGHTTBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("RIGHTTBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTTBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: SAMETBOXTNUMBER */ + case AntlrSQLLexer::SAMETBOXTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SAMETBOXTNUMBER requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameTboxTnumberLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: SAMETBOXTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTTNUMBERTBOX */ + case AntlrSQLLexer::ADJACENTTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ADJACENTTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERTNUMBERTBOX */ + case AntlrSQLLexer::AFTERTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("AFTERTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORETNUMBERTBOX */ + case AntlrSQLLexer::BEFORETNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("BEFORETNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORETNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDTNUMBERTBOX */ + case AntlrSQLLexer::CONTAINEDTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("CONTAINEDTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSTNUMBERTBOX */ + case AntlrSQLLexer::CONTAINSTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("CONTAINSTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTTNUMBERTBOX */ + case AntlrSQLLexer::LEFTTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("LEFTTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERTNUMBERTBOX */ + case AntlrSQLLexer::OVERAFTERTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERAFTERTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORETNUMBERTBOX */ + case AntlrSQLLexer::OVERBEFORETNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERBEFORETNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORETNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSTNUMBERTBOX */ + case AntlrSQLLexer::OVERLAPSTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERLAPSTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTTNUMBERTBOX */ + case AntlrSQLLexer::OVERLEFTTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERLEFTTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTTNUMBERTBOX */ + case AntlrSQLLexer::OVERRIGHTTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("OVERRIGHTTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTTNUMBERTBOX */ + case AntlrSQLLexer::RIGHTTNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("RIGHTTNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTTNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: SAMETNUMBERTBOX */ + case AntlrSQLLexer::SAMETNUMBERTBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("SAMETNUMBERTBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameTnumberTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: SAMETNUMBERTBOX */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TFLOAT_TBOX */ + case AntlrSQLLexer::NAD_TFLOAT_TBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("NAD_TFLOAT_TBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTfloatTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TFLOAT_TBOX */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TINT_TBOX */ + case AntlrSQLLexer::NAD_TINT_TBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("NAD_TINT_TBOX requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + NadTintTboxLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TINT_TBOX */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTTNUMBERTNUMBER */ + case AntlrSQLLexer::ADJACENTTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("ADJACENTTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERTNUMBERTNUMBER */ + case AntlrSQLLexer::AFTERTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("AFTERTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORETNUMBERTNUMBER */ + case AntlrSQLLexer::BEFORETNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("BEFORETNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORETNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDTNUMBERTNUMBER */ + case AntlrSQLLexer::CONTAINEDTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINEDTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSTNUMBERTNUMBER */ + case AntlrSQLLexer::CONTAINSTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("CONTAINSTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTTNUMBERTNUMBER */ + case AntlrSQLLexer::LEFTTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("LEFTTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERTNUMBERTNUMBER */ + case AntlrSQLLexer::OVERAFTERTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERAFTERTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORETNUMBERTNUMBER */ + case AntlrSQLLexer::OVERBEFORETNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERBEFORETNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORETNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSTNUMBERTNUMBER */ + case AntlrSQLLexer::OVERLAPSTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERLAPSTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTTNUMBERTNUMBER */ + case AntlrSQLLexer::OVERLEFTTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERLEFTTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTTNUMBERTNUMBER */ + case AntlrSQLLexer::OVERRIGHTTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("OVERRIGHTTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTTNUMBERTNUMBER */ + case AntlrSQLLexer::RIGHTTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("RIGHTTNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: SAMETNUMBERTNUMBER */ + case AntlrSQLLexer::SAMETNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("SAMETNUMBERTNUMBER requires exactly 2 arguments (arg0, arg1), but got {}", argCount); + + /* Lift constant blobs into function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto arg1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto arg0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameTnumberTnumberLogicalFunction(arg0, arg1)); + } + break; + /* END CODEGEN PARSER GLUE: SAMETNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: TBOOL_END_VALUE */ + case AntlrSQLLexer::TBOOL_END_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TBOOL_END_VALUE requires exactly 2 arguments (value, timestamp), but got {}", argCount); + + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TboolEndValueLogicalFunction(value, timestamp)); + } + break; + /* END CODEGEN PARSER GLUE: TBOOL_END_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: TBOOL_START_VALUE */ + case AntlrSQLLexer::TBOOL_START_VALUE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TBOOL_START_VALUE requires exactly 2 arguments (value, timestamp), but got {}", argCount); + + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TboolStartValueLogicalFunction(value, timestamp)); + } + break; + /* END CODEGEN PARSER GLUE: TBOOL_START_VALUE */ + + /* BEGIN CODEGEN PARSER GLUE: ABOVETSPATIALTSPATIAL */ + case AntlrSQLLexer::ABOVETSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ABOVETSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AboveTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ABOVETSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTTSPATIALTSPATIAL */ + case AntlrSQLLexer::ADJACENTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ADJACENTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERTSPATIALTSPATIAL */ + case AntlrSQLLexer::AFTERTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("AFTERTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: BACKTSPATIALTSPATIAL */ + case AntlrSQLLexer::BACKTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("BACKTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BackTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: BACKTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORETSPATIALTSPATIAL */ + case AntlrSQLLexer::BEFORETSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("BEFORETSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORETSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: BELOWTSPATIALTSPATIAL */ + case AntlrSQLLexer::BELOWTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("BELOWTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BelowTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: BELOWTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDTSPATIALTSPATIAL */ + case AntlrSQLLexer::CONTAINEDTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("CONTAINEDTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSTSPATIALTSPATIAL */ + case AntlrSQLLexer::CONTAINSTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("CONTAINSTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: FRONTTSPATIALTSPATIAL */ + case AntlrSQLLexer::FRONTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("FRONTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + FrontTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: FRONTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: LEFTTSPATIALTSPATIAL */ + case AntlrSQLLexer::LEFTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("LEFTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + LeftTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: LEFTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERABOVETSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERABOVETSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERABOVETSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OveraboveTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERABOVETSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERAFTERTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERAFTERTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBACKTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERBACKTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERBACKTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbackTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBACKTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORETSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERBEFORETSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERBEFORETSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORETSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBELOWTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERBELOWTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERBELOWTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbelowTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBELOWTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERFRONTTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERFRONTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERFRONTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverfrontTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERFRONTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERLAPSTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERLAPSTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLEFTTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERLEFTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERLEFTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverleftTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLEFTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERRIGHTTSPATIALTSPATIAL */ + case AntlrSQLLexer::OVERRIGHTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERRIGHTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverrightTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERRIGHTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: RIGHTTSPATIALTSPATIAL */ + case AntlrSQLLexer::RIGHTTSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("RIGHTTSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + RightTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: RIGHTTSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: SAMETSPATIALTSPATIAL */ + case AntlrSQLLexer::SAMETSPATIALTSPATIAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("SAMETSPATIALTSPATIAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameTspatialTspatialLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: SAMETSPATIALTSPATIAL */ + + /* BEGIN CODEGEN PARSER GLUE: ADJACENTTEMPORALTEMPORAL */ + case AntlrSQLLexer::ADJACENTTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ADJACENTTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AdjacentTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ADJACENTTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: AFTERTEMPORALTEMPORAL */ + case AntlrSQLLexer::AFTERTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("AFTERTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AfterTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: AFTERTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: BEFORETEMPORALTEMPORAL */ + case AntlrSQLLexer::BEFORETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("BEFORETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + BeforeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: BEFORETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINEDTEMPORALTEMPORAL */ + case AntlrSQLLexer::CONTAINEDTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("CONTAINEDTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainedTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINEDTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: CONTAINSTEMPORALTEMPORAL */ + case AntlrSQLLexer::CONTAINSTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("CONTAINSTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + ContainsTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: CONTAINSTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERAFTERTEMPORALTEMPORAL */ + case AntlrSQLLexer::OVERAFTERTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERAFTERTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverafterTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERAFTERTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERBEFORETEMPORALTEMPORAL */ + case AntlrSQLLexer::OVERBEFORETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERBEFORETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverbeforeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERBEFORETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: OVERLAPSTEMPORALTEMPORAL */ + case AntlrSQLLexer::OVERLAPSTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("OVERLAPSTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + OverlapsTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: OVERLAPSTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: SAMETEMPORALTEMPORAL */ + case AntlrSQLLexer::SAMETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("SAMETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + SameTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: SAMETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALCMP */ + case AntlrSQLLexer::TEMPORALCMP: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALCMP requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalCmpLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALCMP */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEQ */ + case AntlrSQLLexer::TEMPORALEQ: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALEQ requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEqLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEQ */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALGE */ + case AntlrSQLLexer::TEMPORALGE: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALGE requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalGeLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALGE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALGT */ + case AntlrSQLLexer::TEMPORALGT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALGT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalGtLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALGT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALLE */ + case AntlrSQLLexer::TEMPORALLE: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALLE requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalLeLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALLE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALLT */ + case AntlrSQLLexer::TEMPORALLT: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALLT requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalLtLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALLT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALNE */ + case AntlrSQLLexer::TEMPORALNE: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALNE requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNeLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALNE */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTEMPORALTEMPORAL */ + case AntlrSQLLexer::ALWAYSEQTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSEQTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGETEMPORALTEMPORAL */ + case AntlrSQLLexer::ALWAYSGETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSGETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTTEMPORALTEMPORAL */ + case AntlrSQLLexer::ALWAYSGTTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSGTTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGtTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLETEMPORALTEMPORAL */ + case AntlrSQLLexer::ALWAYSLETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSLETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTTEMPORALTEMPORAL */ + case AntlrSQLLexer::ALWAYSLTTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSLTTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLtTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETEMPORALTEMPORAL */ + case AntlrSQLLexer::ALWAYSNETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("ALWAYSNETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTEMPORALTEMPORAL */ + case AntlrSQLLexer::EVEREQTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVEREQTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGETEMPORALTEMPORAL */ + case AntlrSQLLexer::EVERGETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVERGETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTTEMPORALTEMPORAL */ + case AntlrSQLLexer::EVERGTTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVERGTTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGtTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLETEMPORALTEMPORAL */ + case AntlrSQLLexer::EVERLETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVERLETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTTEMPORALTEMPORAL */ + case AntlrSQLLexer::EVERLTTEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVERLTTEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLtTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTTEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETEMPORALTEMPORAL */ + case AntlrSQLLexer::EVERNETEMPORALTEMPORAL: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("EVERNETEMPORALTEMPORAL requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTemporalTemporalLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETEMPORALTEMPORAL */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALFRECHETDISTANCE */ + case AntlrSQLLexer::TEMPORALFRECHETDISTANCE: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALFRECHETDISTANCE requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalFrechetDistanceLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALFRECHETDISTANCE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALHAUSDORFFDISTANCE */ + case AntlrSQLLexer::TEMPORALHAUSDORFFDISTANCE: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALHAUSDORFFDISTANCE requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalHausdorffDistanceLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALHAUSDORFFDISTANCE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALDYNTIMEWARPDISTANCE */ + case AntlrSQLLexer::TEMPORALDYNTIMEWARPDISTANCE: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALDYNTIMEWARPDISTANCE requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalDyntimewarpDistanceLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALDYNTIMEWARPDISTANCE */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALNADTGEOMETRY */ + case AntlrSQLLexer::TEMPORALNADTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALNADTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALNADTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TFLOAT */ + case AntlrSQLLexer::TEMPORAL_NAD_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_NAD_TFLOAT requires exactly 4 arguments (valueA, tsA, valueB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto valueB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto valueA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTFloatLogicalFunction(valueA, tsA, valueB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TINT */ + case AntlrSQLLexer::TEMPORAL_NAD_TINT: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_NAD_TINT requires exactly 4 arguments (valueA, tsA, valueB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto valueB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto valueA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTIntLogicalFunction(valueA, tsA, valueB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTFLOATFLOAT */ + case AntlrSQLLexer::ALWAYSEQTFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGETFLOATFLOAT */ + case AntlrSQLLexer::ALWAYSGETFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGETFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGeTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGETFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTTFLOATFLOAT */ + case AntlrSQLLexer::ALWAYSGTTFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGTTFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGtTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTTFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLETFLOATFLOAT */ + case AntlrSQLLexer::ALWAYSLETFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLETFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLeTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLETFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTTFLOATFLOAT */ + case AntlrSQLLexer::ALWAYSLTTFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLTTFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLtTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTTFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETFLOATFLOAT */ + case AntlrSQLLexer::ALWAYSNETFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTFLOATFLOAT */ + case AntlrSQLLexer::EVEREQTFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGETFLOATFLOAT */ + case AntlrSQLLexer::EVERGETFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGETFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGeTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGETFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTTFLOATFLOAT */ + case AntlrSQLLexer::EVERGTTFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGTTFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGtTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTTFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLETFLOATFLOAT */ + case AntlrSQLLexer::EVERLETFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLETFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLeTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLETFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTTFLOATFLOAT */ + case AntlrSQLLexer::EVERLTTFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLTTFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLtTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTTFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETFLOATFLOAT */ + case AntlrSQLLexer::EVERNETFLOATFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETFLOATFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTfloatFloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETFLOATFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTINTINT */ + case AntlrSQLLexer::ALWAYSEQTINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQTINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGETINTINT */ + case AntlrSQLLexer::ALWAYSGETINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGETINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGeTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGETINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTTINTINT */ + case AntlrSQLLexer::ALWAYSGTTINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGTTINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGtTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTTINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLETINTINT */ + case AntlrSQLLexer::ALWAYSLETINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLETINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLeTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLETINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTTINTINT */ + case AntlrSQLLexer::ALWAYSLTTINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLTTINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLtTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTTINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETINTINT */ + case AntlrSQLLexer::ALWAYSNETINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNETINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTINTINT */ + case AntlrSQLLexer::EVEREQTINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQTINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGETINTINT */ + case AntlrSQLLexer::EVERGETINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGETINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGeTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGETINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTTINTINT */ + case AntlrSQLLexer::EVERGTTINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGTTINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGtTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTTINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLETINTINT */ + case AntlrSQLLexer::EVERLETINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLETINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLeTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLETINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTTINTINT */ + case AntlrSQLLexer::EVERLTTINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLTTINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLtTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTTINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETINTINT */ + case AntlrSQLLexer::EVERNETINTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNETINTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTintIntLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETINTINT */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_FLOAT_SCALAR */ + case AntlrSQLLexer::TEMPORAL_NAD_FLOAT_SCALAR: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEMPORAL_NAD_FLOAT_SCALAR requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADFloatScalarLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_FLOAT_SCALAR */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_INT_SCALAR */ + case AntlrSQLLexer::TEMPORAL_NAD_INT_SCALAR: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TEMPORAL_NAD_INT_SCALAR requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADIntScalarLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_INT_SCALAR */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQFLOATTFLOAT */ + case AntlrSQLLexer::ALWAYSEQFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGEFLOATTFLOAT */ + case AntlrSQLLexer::ALWAYSGEFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGEFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGeFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGEFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTFLOATTFLOAT */ + case AntlrSQLLexer::ALWAYSGTFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGTFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGtFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLEFLOATTFLOAT */ + case AntlrSQLLexer::ALWAYSLEFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLEFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLeFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLEFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTFLOATTFLOAT */ + case AntlrSQLLexer::ALWAYSLTFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLTFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLtFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNEFLOATTFLOAT */ + case AntlrSQLLexer::ALWAYSNEFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNEFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNEFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQFLOATTFLOAT */ + case AntlrSQLLexer::EVEREQFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGEFLOATTFLOAT */ + case AntlrSQLLexer::EVERGEFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGEFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGeFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGEFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTFLOATTFLOAT */ + case AntlrSQLLexer::EVERGTFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGTFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGtFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLEFLOATTFLOAT */ + case AntlrSQLLexer::EVERLEFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLEFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLeFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLEFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTFLOATTFLOAT */ + case AntlrSQLLexer::EVERLTFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLTFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLtFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNEFLOATTFLOAT */ + case AntlrSQLLexer::EVERNEFLOATTFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNEFLOATTFLOAT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeFloatTfloatLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNEFLOATTFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQINTTINT */ + case AntlrSQLLexer::ALWAYSEQINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSEQINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGEINTTINT */ + case AntlrSQLLexer::ALWAYSGEINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGEINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGeIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGEINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSGTINTTINT */ + case AntlrSQLLexer::ALWAYSGTINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSGTINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysGtIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSGTINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLEINTTINT */ + case AntlrSQLLexer::ALWAYSLEINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLEINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLeIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLEINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSLTINTTINT */ + case AntlrSQLLexer::ALWAYSLTINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSLTINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysLtIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSLTINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNEINTTINT */ + case AntlrSQLLexer::ALWAYSNEINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("ALWAYSNEINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNEINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQINTTINT */ + case AntlrSQLLexer::EVEREQINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVEREQINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGEINTTINT */ + case AntlrSQLLexer::EVERGEINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGEINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGeIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGEINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERGTINTTINT */ + case AntlrSQLLexer::EVERGTINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERGTINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverGtIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERGTINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLEINTTINT */ + case AntlrSQLLexer::EVERLEINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLEINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLeIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLEINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERLTINTTINT */ + case AntlrSQLLexer::EVERLTINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERLTINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverLtIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERLTINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNEINTTINT */ + case AntlrSQLLexer::EVERNEINTTINT: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("EVERNEINTTINT requires exactly 3 arguments (value, timestamp, scalar), but got {}", argCount); + + /* Lift the scalar constant — accept FLOAT64 (strtod-clean) and INT32 */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto scalar = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto value = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeIntTintLogicalFunction(value, timestamp, scalar)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNEINTTINT */ + + /* BEGIN CODEGEN PARSER GLUE: MULTTNUMBERTNUMBER */ + case AntlrSQLLexer::MULTTNUMBERTNUMBER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("MULTTNUMBERTNUMBER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(MultTnumberTnumberLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: MULTTNUMBERTNUMBER */ + + /* BEGIN CODEGEN PARSER GLUE: TCONTAINSTGEOTGEO */ + case AntlrSQLLexer::TCONTAINSTGEOTGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TCONTAINSTGEOTGEO requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TcontainsTgeoTgeoLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TCONTAINSTGEOTGEO */ + + /* BEGIN CODEGEN PARSER GLUE: TCOVERSTGEOTGEO */ + case AntlrSQLLexer::TCOVERSTGEOTGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TCOVERSTGEOTGEO requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TcoversTgeoTgeoLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TCOVERSTGEOTGEO */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCETGEOTGEO */ + case AntlrSQLLexer::TDISTANCETGEOTGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TDISTANCETGEOTGEO requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTgeoTgeoLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCETGEOTGEO */ + + /* BEGIN CODEGEN PARSER GLUE: TCONTAINSTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TCONTAINSTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TCONTAINSTCBUFFERTCBUFFER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TcontainsTcbufferTcbufferLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TCONTAINSTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TCOVERSTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TCOVERSTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TCOVERSTCBUFFERTCBUFFER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TcoversTcbufferTcbufferLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TCOVERSTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCETCBUFFERTCBUFFER */ + case AntlrSQLLexer::TDISTANCETCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TDISTANCETCBUFFERTCBUFFER requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTcbufferTcbufferLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCETCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCETNPOINTTNPOINT */ + case AntlrSQLLexer::TDISTANCETNPOINTTNPOINT: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TDISTANCETNPOINTTNPOINT requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTnpointTnpointLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCETNPOINTTNPOINT */ + + /* BEGIN CODEGEN PARSER GLUE: TDISTANCETPOSETPOSE */ + case AntlrSQLLexer::TDISTANCETPOSETPOSE: + { + const auto argCount = context->expression().size(); + if (argCount != 2) + throw InvalidQuerySyntax("TDISTANCETPOSETPOSE requires exactly 2 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TdistanceTposeTposeLogicalFunction(a0, a1)); + } + break; + /* END CODEGEN PARSER GLUE: TDISTANCETPOSETPOSE */ + + /* BEGIN CODEGEN PARSER GLUE: TPOINT_LENGTH_WKB */ + case AntlrSQLLexer::TPOINT_LENGTH_WKB: + { + const auto argCount = context->expression().size(); + if (argCount != 1) + throw InvalidQuerySyntax("TPOINT_LENGTH_WKB requires exactly 1 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TpointLengthWkbLogicalFunction(a0)); + } + break; + /* END CODEGEN PARSER GLUE: TPOINT_LENGTH_WKB */ + + /* BEGIN CODEGEN PARSER GLUE: TNPOINT_LENGTH */ + case AntlrSQLLexer::TNPOINT_LENGTH: + { + const auto argCount = context->expression().size(); + if (argCount != 3) + throw InvalidQuerySyntax("TNPOINT_LENGTH requires exactly 3 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TnpointLengthLogicalFunction(a0, a1, a2)); + } + break; + /* END CODEGEN PARSER GLUE: TNPOINT_LENGTH */ + + /* BEGIN CODEGEN PARSER GLUE: TCBUFFER_TO_TFLOAT */ + case AntlrSQLLexer::TCBUFFER_TO_TFLOAT: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TCBUFFER_TO_TFLOAT requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(TcbufferToTfloatLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: TCBUFFER_TO_TFLOAT */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TCBUFFER_STBOX */ + case AntlrSQLLexer::NAD_TCBUFFER_STBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("NAD_TCBUFFER_STBOX requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTcbufferStboxLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TCBUFFER_STBOX */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TNPOINT_STBOX */ + case AntlrSQLLexer::NAD_TNPOINT_STBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("NAD_TNPOINT_STBOX requires exactly 4 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTnpointStboxLogicalFunction(a0, a1, a2, a3)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TNPOINT_STBOX */ + + /* BEGIN CODEGEN PARSER GLUE: NAD_TPOSE_STBOX */ + case AntlrSQLLexer::NAD_TPOSE_STBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("NAD_TPOSE_STBOX requires exactly 5 arguments, but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto a4 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a3 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a2 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a1 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto a0 = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back(NadTposeStboxLogicalFunction(a0, a1, a2, a3, a4)); + } + break; + /* END CODEGEN PARSER GLUE: NAD_TPOSE_STBOX */ + + /* BEGIN CODEGEN PARSER GLUE: ATOUCHESTPOINTGEO */ + case AntlrSQLLexer::ATOUCHESTPOINTGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ATOUCHESTPOINTGEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AtouchesTpointGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ATOUCHESTPOINTGEO */ + + /* BEGIN CODEGEN PARSER GLUE: ETOUCHESTPOINTGEO */ + case AntlrSQLLexer::ETOUCHESTPOINTGEO: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("ETOUCHESTPOINTGEO requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EtouchesTpointGeoLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ETOUCHESTPOINTGEO */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALACONTAINSGEOMETRY */ + case AntlrSQLLexer::TEMPORALACONTAINSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALACONTAINSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALACONTAINSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADISJOINTGEOMETRY */ + case AntlrSQLLexer::TEMPORALADISJOINTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALADISJOINTGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADISJOINTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALAINTERSECTSGEOMETRY */ + case AntlrSQLLexer::TEMPORALAINTERSECTSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALAINTERSECTSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALAINTERSECTSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALATOUCHESGEOMETRY */ + case AntlrSQLLexer::TEMPORALATOUCHESGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALATOUCHESGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALATOUCHESGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECONTAINSGEOMETRY */ + case AntlrSQLLexer::TEMPORALECONTAINSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALECONTAINSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECONTAINSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECOVERSGEOMETRY */ + case AntlrSQLLexer::TEMPORALECOVERSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALECOVERSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECOVERSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDISJOINTGEOMETRY */ + case AntlrSQLLexer::TEMPORALEDISJOINTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALEDISJOINTGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDISJOINTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEINTERSECTSGEOMETRY */ + case AntlrSQLLexer::TEMPORALEINTERSECTSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALEINTERSECTSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEINTERSECTSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALETOUCHESGEOMETRY */ + case AntlrSQLLexer::TEMPORALETOUCHESGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALETOUCHESGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALETOUCHESGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALINTERSECTSGEOMETRY */ + case AntlrSQLLexer::TEMPORALINTERSECTSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALINTERSECTSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalIntersectsGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALINTERSECTSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALATGEOMETRY */ + case AntlrSQLLexer::TEMPORALATGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALATGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAtGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALATGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALMINUSGEOMETRY */ + case AntlrSQLLexer::TEMPORALMINUSGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORALMINUSGEOMETRY requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalMinusGeometryLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALMINUSGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADWITHINGEOMETRY */ + case AntlrSQLLexer::TEMPORALADWITHINGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALADWITHINGEOMETRY requires exactly 5 arguments (lon, lat, timestamp, geometry, distance), but got {}", argCount); + + /* Lift constants (geometry + distance) — same shape as EDWITHIN_TGEO_GEO */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + const auto upperValue = Util::toUpperCase(constantValue); + if (upperValue == "TRUE" || upperValue == "FALSE") + { + dataType = DataTypeProvider::provideDataType(DataType::Type::BOOLEAN); + } + else + { + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + } + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + /* After lift: [lon, lat, ts, distance, geometry] (geometry pushed last because lifted last in LIFO) */ + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinGeometryLogicalFunction(lon, lat, timestamp, geometry, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADWITHINGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDWITHINGEOMETRY */ + case AntlrSQLLexer::TEMPORALEDWITHINGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALEDWITHINGEOMETRY requires exactly 5 arguments (lon, lat, timestamp, geometry, distance), but got {}", argCount); + + /* Lift constants (geometry + distance) — same shape as EDWITHIN_TGEO_GEO */ + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + const auto upperValue = Util::toUpperCase(constantValue); + if (upperValue == "TRUE" || upperValue == "FALSE") + { + dataType = DataTypeProvider::provideDataType(DataType::Type::BOOLEAN); + } + else + { + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + } + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + /* After lift: [lon, lat, ts, distance, geometry] (geometry pushed last because lifted last in LIFO) */ + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinGeometryLogicalFunction(lon, lat, timestamp, geometry, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDWITHINGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADWITHINTGEOMETRY */ + case AntlrSQLLexer::TEMPORALADWITHINTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("TEMPORALADWITHINTGEOMETRY requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADWITHINTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDWITHINTGEOMETRY */ + case AntlrSQLLexer::TEMPORALEDWITHINTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 7) + throw InvalidQuerySyntax("TEMPORALEDWITHINTGEOMETRY requires exactly 7 arguments (lonA, latA, tsA, lonB, latB, tsB, distance), but got {}", argCount); + + /* Lift the distance constant */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDWITHINTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALACONTAINSTGEOMETRY */ + case AntlrSQLLexer::TEMPORALACONTAINSTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALACONTAINSTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALACONTAINSTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADISJOINTTGEOMETRY */ + case AntlrSQLLexer::TEMPORALADISJOINTTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALADISJOINTTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADISJOINTTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTGEOMETRY */ + case AntlrSQLLexer::TEMPORALAINTERSECTSTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALAINTERSECTSTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALATOUCHESTGEOMETRY */ + case AntlrSQLLexer::TEMPORALATOUCHESTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALATOUCHESTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALATOUCHESTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECONTAINSTGEOMETRY */ + case AntlrSQLLexer::TEMPORALECONTAINSTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALECONTAINSTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECONTAINSTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECOVERSTGEOMETRY */ + case AntlrSQLLexer::TEMPORALECOVERSTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALECOVERSTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECOVERSTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDISJOINTTGEOMETRY */ + case AntlrSQLLexer::TEMPORALEDISJOINTTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALEDISJOINTTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDISJOINTTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEINTERSECTSTGEOMETRY */ + case AntlrSQLLexer::TEMPORALEINTERSECTSTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALEINTERSECTSTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEINTERSECTSTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALETOUCHESTGEOMETRY */ + case AntlrSQLLexer::TEMPORALETOUCHESTGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALETOUCHESTGEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALETOUCHESTGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_GEOMETRY */ + case AntlrSQLLexer::TEMPORAL_NAD_GEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORAL_NAD_GEOMETRY requires exactly 6 arguments (lonA, latA, tsA, lonB, latB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADGeometryLogicalFunction(lonA, latA, tsA, lonB, latB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_GEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALACONTAINSTCBUFFER */ + case AntlrSQLLexer::TEMPORALACONTAINSTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALACONTAINSTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALACONTAINSTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALACOVERSTCBUFFER */ + case AntlrSQLLexer::TEMPORALACOVERSTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALACOVERSTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalACoversTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALACOVERSTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADISJOINTTCBUFFER */ + case AntlrSQLLexer::TEMPORALADISJOINTTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALADISJOINTTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADISJOINTTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTCBUFFER */ + case AntlrSQLLexer::TEMPORALAINTERSECTSTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALAINTERSECTSTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALATOUCHESTCBUFFER */ + case AntlrSQLLexer::TEMPORALATOUCHESTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALATOUCHESTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALATOUCHESTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECONTAINSTCBUFFER */ + case AntlrSQLLexer::TEMPORALECONTAINSTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALECONTAINSTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECONTAINSTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECOVERSTCBUFFER */ + case AntlrSQLLexer::TEMPORALECOVERSTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALECOVERSTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECOVERSTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDISJOINTTCBUFFER */ + case AntlrSQLLexer::TEMPORALEDISJOINTTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALEDISJOINTTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDISJOINTTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEINTERSECTSTCBUFFER */ + case AntlrSQLLexer::TEMPORALEINTERSECTSTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALEINTERSECTSTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEINTERSECTSTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALETOUCHESTCBUFFER */ + case AntlrSQLLexer::TEMPORALETOUCHESTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALETOUCHESTCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALETOUCHESTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TCBUFFER */ + case AntlrSQLLexer::TEMPORAL_NAD_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_NAD_TCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADWITHINTCBUFFERGEOMETRY */ + case AntlrSQLLexer::TEMPORALADWITHINTCBUFFERGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALADWITHINTCBUFFERGEOMETRY requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTCbufferGeometryLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADWITHINTCBUFFERGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDWITHINTCBUFFERGEOMETRY */ + case AntlrSQLLexer::TEMPORALEDWITHINTCBUFFERGEOMETRY: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALEDWITHINTCBUFFERGEOMETRY requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTCbufferGeometryLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDWITHINTCBUFFERGEOMETRY */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSEQTCBUFFERCBUFFER */ + case AntlrSQLLexer::ALWAYSEQTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ALWAYSEQTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysEqTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSEQTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: ALWAYSNETCBUFFERCBUFFER */ + case AntlrSQLLexer::ALWAYSNETCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("ALWAYSNETCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + AlwaysNeTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: ALWAYSNETCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EVEREQTCBUFFERCBUFFER */ + case AntlrSQLLexer::EVEREQTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EVEREQTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverEqTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EVEREQTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: EVERNETCBUFFERCBUFFER */ + case AntlrSQLLexer::EVERNETCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("EVERNETCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + EverNeTcbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: EVERNETCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALACONTAINSTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALACONTAINSTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALACONTAINSTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAContainsTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALACONTAINSTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALACOVERSTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALACOVERSTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALACOVERSTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalACoversTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALACOVERSTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADISJOINTTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALADISJOINTTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALADISJOINTTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADISJOINTTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALAINTERSECTSTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALAINTERSECTSTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALATOUCHESTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALATOUCHESTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALATOUCHESTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALATOUCHESTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECONTAINSTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALECONTAINSTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALECONTAINSTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEContainsTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECONTAINSTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECOVERSTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALECOVERSTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALECOVERSTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECOVERSTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDISJOINTTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALEDISJOINTTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALEDISJOINTTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDisjointTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDISJOINTTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEINTERSECTSTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALEINTERSECTSTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALEINTERSECTSTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEINTERSECTSTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALETOUCHESTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALETOUCHESTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORALETOUCHESTCBUFFERCBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALETOUCHESTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TCBUFFER_CBUFFER */ + case AntlrSQLLexer::TEMPORAL_NAD_TCBUFFER_CBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 5) + throw InvalidQuerySyntax("TEMPORAL_NAD_TCBUFFER_CBUFFER requires exactly 5 arguments (lon, lat, radius, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TCBUFFER_CBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADWITHINTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALADWITHINTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALADWITHINTCBUFFERCBUFFER requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADWITHINTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDWITHINTCBUFFERCBUFFER */ + case AntlrSQLLexer::TEMPORALEDWITHINTCBUFFERCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 6) + throw InvalidQuerySyntax("TEMPORALEDWITHINTCBUFFERCBUFFER requires exactly 6 arguments (lon, lat, radius, timestamp, blob, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto constantValue = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + + DataType dataType; + char* endPtr = nullptr; + std::strtod(constantValue.c_str(), &endPtr); + if (endPtr != nullptr && *endPtr == '\0') + dataType = DataTypeProvider::provideDataType(DataType::Type::FLOAT64); + else + dataType = DataTypeProvider::provideDataType(DataType::Type::VARSIZED); + helpers.top().functionBuilder.emplace_back(ConstantValueLogicalFunction(dataType, std::move(constantValue))); + } + + auto blobLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto distLast = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radius = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTCbufferCbufferLogicalFunction(lon, lat, radius, timestamp, blobLast, distLast)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDWITHINTCBUFFERCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADISJOINTTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TEMPORALADISJOINTTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORALADISJOINTTCBUFFERTCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADisjointTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADISJOINTTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TEMPORALAINTERSECTSTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORALAINTERSECTSTCBUFFERTCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAIntersectsTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALAINTERSECTSTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALATOUCHESTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TEMPORALATOUCHESTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORALATOUCHESTCBUFFERTCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalATouchesTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALATOUCHESTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALECOVERSTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TEMPORALECOVERSTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORALECOVERSTCBUFFERTCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalECoversTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALECOVERSTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_NAD_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::TEMPORAL_NAD_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_NAD_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalNADTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_NAD_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALADWITHINTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TEMPORALADWITHINTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("TEMPORALADWITHINTCBUFFERTCBUFFER requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalADWithinTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALADWITHINTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORALEDWITHINTCBUFFERTCBUFFER */ + case AntlrSQLLexer::TEMPORALEDWITHINTCBUFFERTCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 9) + throw InvalidQuerySyntax("TEMPORALEDWITHINTCBUFFERTCBUFFER requires exactly 9 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, distance), but got {}", argCount); + + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::FLOAT64), std::move(v))); + } + + auto dist = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEDWithinTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB, dist)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORALEDWITHINTCBUFFERTCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_AT_STBOX */ + case AntlrSQLLexer::TEMPORAL_AT_STBOX: + { + const auto argCount = context->expression().size(); + if (argCount != 4) + throw InvalidQuerySyntax("TEMPORAL_AT_STBOX requires exactly 4 arguments (lon, lat, timestamp, geometry), but got {}", argCount); + + /* Lift the WKT constant into the function builder */ + while (!helpers.top().constantBuilder.empty()) + { + auto v = std::move(helpers.top().constantBuilder.back()); + helpers.top().constantBuilder.pop_back(); + helpers.top().functionBuilder.emplace_back( + ConstantValueLogicalFunction( + DataTypeProvider::provideDataType(DataType::Type::VARSIZED), std::move(v))); + } + + auto geometry = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto timestamp = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lat = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lon = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalAtStBoxLogicalFunction(lon, lat, timestamp, geometry)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_AT_STBOX */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalEIntersectsTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_EINTERSECTS_TCBUFFER_TCBUFFER */ + + /* BEGIN CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER */ + case AntlrSQLLexer::TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER: + { + const auto argCount = context->expression().size(); + if (argCount != 8) + throw InvalidQuerySyntax("TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER requires exactly 8 arguments (lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB), but got {}", argCount); + + auto tsB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonB = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto tsA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto radiusA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto latA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + auto lonA = helpers.top().functionBuilder.back(); helpers.top().functionBuilder.pop_back(); + + helpers.top().functionBuilder.emplace_back( + TemporalETouchesTCbufferTCbufferLogicalFunction(lonA, latA, radiusA, tsA, lonB, latB, radiusB, tsB)); + } + break; + /* END CODEGEN PARSER GLUE: TEMPORAL_ETOUCHES_TCBUFFER_TCBUFFER */ + + default: /// Check if the function is a constructor for a datatype if (const auto dataType = DataTypeProvider::tryProvideDataType(funcName); dataType.has_value())